{"id":24773908,"url":"https://github.com/sourcemeta-research/alterschema","last_synced_at":"2025-04-07T10:25:51.258Z","repository":{"id":39000117,"uuid":"495537045","full_name":"sourcemeta-research/alterschema","owner":"sourcemeta-research","description":"Convert between JSON Schema specification versions","archived":false,"fork":false,"pushed_at":"2025-01-27T19:49:59.000Z","size":2563,"stargazers_count":81,"open_issues_count":8,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T08:12:09.419Z","etag":null,"topics":["json","json-schema","schema"],"latest_commit_sha":null,"homepage":"https://alterschema.sourcemeta.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcemeta-research.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sourcemeta"}},"created_at":"2022-05-23T18:56:37.000Z","updated_at":"2025-03-31T05:45:19.000Z","dependencies_parsed_at":"2024-06-18T21:26:00.615Z","dependency_job_id":"258c134c-adf6-40e9-aae6-e7bc0ae6463c","html_url":"https://github.com/sourcemeta-research/alterschema","commit_stats":{"total_commits":194,"total_committers":3,"mean_commits":64.66666666666667,"dds":"0.11340206185567014","last_synced_commit":"4af16b8701c30e30e4f5df69545edf6310133e77"},"previous_names":["sourcemeta-research/alterschema"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcemeta-research%2Falterschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcemeta-research%2Falterschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcemeta-research%2Falterschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcemeta-research%2Falterschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcemeta-research","download_url":"https://codeload.github.com/sourcemeta-research/alterschema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247633889,"owners_count":20970413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-schema","schema"],"created_at":"2025-01-29T05:08:30.829Z","updated_at":"2025-04-07T10:25:51.227Z","avatar_url":"https://github.com/sourcemeta-research.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sourcemeta"],"categories":["JavaScript"],"sub_categories":[],"readme":"alterschema\n===========\n\n[\u003cimg src=\"./assets/logo.svg\" align=\"right\" width=\"100\"\u003e](https://json-schema.org)\n\nThis project implements a language-independent [set of formal\ntransformations](https://github.com/jviotti/alterschema/tree/main/legacy/rules) to\nautomatically transform [JSON Schema](https://json-schema.org) documents across\nversions of the specification.\n\n**Try the web playground at:\n[https://alterschema.sourcemeta.com](https://alterschema.sourcemeta.com)**\n\nCoverage\n--------\n\n| From    | To      | Type     | Status       | Description                                                      |\n|---------|---------|----------|--------------|------------------------------------------------------------------|\n| 2019-09 | 2020-12 | Lossless | Full         | JSON Schema [2019-09][2019-09] to JSON Schema [2020-12][2020-12] |\n| draft7  | 2019-09 | Lossless | Full         | JSON Schema [Draft 7][draft7] to JSON Schema [2019-09][2019-09]  |\n| draft6  | draft7  | Lossless | Full         | JSON Schema [Draft 6][draft6] to JSON Schema [Draft 7][draft7]   |\n| draft4  | draft6  | Lossless | Full         | JSON Schema [Draft 4][draft4] to JSON Schema [Draft 6][draft6]   |\n| draft3  | draft4  | Lossless | Minimal [^1] | JSON Schema [Draft 3][draft3] to JSON Schema [Draft 4][draft4]   |\n\n[^1]: This is a heavy work-in-progress. Subscribe to https://github.com/sourcemeta/alterschema/issues/83 for the latest updates.\n\nTransformations are transitively applied. For example, transforming from\n`draft6` to `2019-09` implies transforming `draft6` to `draft7` and `draft7` to\n`2019-09`.\n\nBindings\n--------\n\n### JavaScript\n\n```js\n// (1) Install by running \"npm install --save alterschema\"\nconst alterschema = require('alterschema')\n\n// (2) alterschema(schema: JSON, from: string, to: string) -\u003e JSON\n// Transform the input document `schema` according to the\n// `from` and `to` string parameters.\nconst result = await alterschema({ ... }, '2019-09', '2020-12')\n\nconsole.log(result)\n```\n\n#### Command-line tool\n\n```sh\n# (1) Install globally through npm\nnpm install --global alterschema\n# (2) Run the command-line tool\nalterschema --from \u003cfrom\u003e --to \u003cto\u003e path/to/schema.json\n```\n\n### Others\n\nWe accept contributions to implement `alterschema` in any programming language.\nTo produce an `alterschema` implementation, your programming language of choice\nmust support a JSON Schema 2020-12 validator and a\n[JSON-e](https://json-e.js.org) interpreter.\n\nAcknowledgements\n----------------\n\nSpecial thanks to [@gregdeniss](https://github.com/gregsdennis) for curating\nthe initial set of upgrade rules.\n\n[2020-12]: https://json-schema.org/draft/2020-12/json-schema-core.html\n[2019-09]: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-02\n[draft7]: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-00\n[draft6]: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01\n[draft4]: https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-04\n[draft3]: https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-03\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcemeta-research%2Falterschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcemeta-research%2Falterschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcemeta-research%2Falterschema/lists"}