{"id":13574637,"url":"https://github.com/cloudflare/json-schema-tools","last_synced_at":"2025-04-09T06:10:53.283Z","repository":{"id":38953913,"uuid":"128252760","full_name":"cloudflare/json-schema-tools","owner":"cloudflare","description":"Packages for working with JSON Schema and JSON Hyper-Schema","archived":false,"fork":false,"pushed_at":"2024-09-25T22:37:12.000Z","size":1584,"stargazers_count":331,"open_issues_count":38,"forks_count":30,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-01T14:46:33.539Z","etag":null,"topics":["hyper-schemas","json-hyper-schema","json-schema","rest","rest-api","rest-client","subschema"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2018-04-05T19:12:43.000Z","updated_at":"2025-03-08T21:23:48.000Z","dependencies_parsed_at":"2024-03-17T04:38:28.583Z","dependency_job_id":"7fb9194e-46c5-4a3a-8526-61fcc83e690e","html_url":"https://github.com/cloudflare/json-schema-tools","commit_stats":{"total_commits":98,"total_committers":8,"mean_commits":12.25,"dds":0.0714285714285714,"last_synced_commit":"1ed3686c038501824a2f7d06af572cfd485f8b64"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fjson-schema-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fjson-schema-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fjson-schema-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fjson-schema-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudflare","download_url":"https://codeload.github.com/cloudflare/json-schema-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["hyper-schemas","json-hyper-schema","json-schema","rest","rest-api","rest-client","subschema"],"created_at":"2024-08-01T15:00:53.225Z","updated_at":"2025-04-09T06:10:53.265Z","avatar_url":"https://github.com/cloudflare.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","rest-api","Developer Tools"],"sub_categories":["API \u0026 Documentation"],"readme":"# JSON Schema Tools\n\nThis is a monorepo of packages for working with\n[JSON Schema and JSON Hyper-Schema](http://json-schema.org),\nbuilt using [Lerna](https://github.com/lerna/lerna) and\n[Yarn Workspaces](https://yarnpkg.com/lang/en/docs/workspaces/).\n\nThe repo includes everything from generic utilities to small applications\nbuilt on these and other packages.\n\nThe packages are intended for general use, so\nwhile they may support some Cloudflare extensions to JSON Schema,\nthey should all be usable with schemas that rely only on the\nstandard keywords and features.\n\n## Note that these packages have not yet reached a stable interface\n\nInterfaces will change and packages will be refactored until each package\nreaches a 1.0 status.  This will likely occur once JSON Schema [draft-08](https://github.com/json-schema-org/json-schema-spec/milestone/6), which\nwill have some very significant new features, is finalized.  In particular,\nthe concept of a Schema Vocabulary appears in several locations but is neither\nwell nor consistently managed in the current code.  Draft-08 will formalize\nthat concept.\n\nIf you are interested in building on these packages, please file an issue indicating what you need to use and we will work to ensure reasonable levels of support as we finalize the interfaces.\n\n## The packages\n\nPackages fall into a few categories.  Currently, the packages in this repository\nfocus on static manipulation and processing of schemas, in particular for\ngenerating API documentation.  The following diagram gives an overview of how this\nand potentially other kinds of static processing work:\n\n![A possible json-schema-tools data flow for static schema processing would likely involve the walker and transform packages, which can produce schemas suitable for use in applications such as the Doca API documentation system.](docs/static-processing.png \"Static processing data flows\")\n\nAdditional packages will likely add runtime functionality, including automated API\ntesting support based on JSON Hyper-Schema.\n\n### `@cloudflare/json-schema-walker`\n\n[`json-schema-walker`](workspaces/json-schema-walker/README.md) is the most fundamental static schema processing package: it is aware of subschema applicators and uses that knowledge to walk over a schema and make callbacks before and/or after visiting any subschemas.\n\nMost schema transformations work by changing a schema object after its subschemas have been visited, so that all transformations are guaranteed to have already been applied to any subschemas.\n\nThere are variants for visiting all schemas including the root, as well as for only visiting subschemas.\n\n### `@cloudflare/json-schema-transform`\n\n[`json-schema-transform`](workspaces/json-schema-transform/README.md) is a collection of utility functions, most of which are either callbacks intended for use with `json-schema -walker`, or make use of `json-schema-walker` internally.  This package will eventually include transforms for converting one draft to another.\n\nAmong other things, this makes replacements for the internals of the deprecated `json-schema-example-loader` package available outside of Webpack.  See `json-schema-apidoc-loader` for use with Webpack.\n\n### `@cloudflare/json-hyper-schema`\n\n[`json-hyper-schema`](workspaces/json-hyper-schema/README.md) is an implementation of the JSON Hyper-Schema specification, supporting both static (currently) and dynamic (in the future) use of Hyper-Schemas.  Eventually, we hope to build a fully-featured hyperclient based on this package.\n\nCurrently, this just includes some utilities for looking up link description objects and resolving URI Templates from an instance.  Some of these utilities are replacements for internals of the deprecated `json-schema-example-loader`.\n\n### `@cloudflare/json-schema-test`\n\n_This package has not yet been created._\n\nApplies schema validation to API requests and responses.  This will primarily leverage JSON Hyper-Schema but other utilities such as a [Jest](https://facebook.github.io/jest/) matcher for regular schema validation will be included.\n\n## Applications and application support\n\nCurrently, the only application provided is an API documentation system known as \"Doca\".  This is a refactored and re-designed version of [our existing Doca suite](https://github.com/cloudflare/doca)\n\n### `@cloudflare/doca`\n\nScaffolding system to generate API documentation apps.\n\nReplaces the existing `doca` package, which is now deprecated.\n\n### `@cloudflare/doca-default-theme`\n\nThe default UI for documentation apps scaffolded by `@cloudflare/doca`.\n\nWill eventually fully replace `doca-bootstrap-theme`, but currently this is a bare-bones display of the processed JSON Schemas.  It is provided mainly for debugging purposes and as a starting point for 3rd-party UI themes.\n\n### `@cloudflare/json-schema-ref-loader`\n\n[Webpack](https://webpack.js.org/) loader that uses `json-schema-transform` and other packages to load schemas written in JSON, JSON5, YAML, or JavaScript formats and dereference all `$ref` occurrences.  All referenced schemas are added as dependencies.\n\nCurrently this loader can only be used with schemas that do not have any cyclic references as dereferencing is the only option for loading.\n\nReplaces `json-schema-loader`\n\n### `@cloudflare/json-schema-apidoc-loader`\n\n[Webpack](https://webpack.js.org/) loader that uses `json-schema-transform` and other packages to convert de-referenced (no `$ref`s) into a form suitable for generating documentation, including examples.\n\nReplaces `json-schema-example-loader`\n\n\n## Installation\n\n### Installing and using a single package\n\nFind the package in the [`workspaces/` directory](workspaces) and\nopen its README.md for documentation.\n\n## Installing the monorepo\n\nPlease use recent versions of lerna (2+), node (6+) and yarn (v1+).\nSimply clone the repository and run `lerna bootstrap`, which will\nuse yarn.  A known good version of yarn is included in\nthe `scripts` directory and configured in this repository's `.yarnrc`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fjson-schema-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudflare%2Fjson-schema-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fjson-schema-tools/lists"}