{"_id":"json-schema-typed","_rev":"4103945","name":"json-schema-typed","description":"JSON Schema TypeScript definitions with complete inline documentation.","dist-tags":{"latest":"8.0.2"},"maintainers":[{"name":"remyrylan","email":""}],"time":{"modified":"2026-01-11T18:47:59.000Z","created":"2019-02-20T08:16:52.625Z","8.0.2":"2025-11-17T20:30:24.942Z","8.0.1":"2022-03-04T16:24:32.121Z","8.0.0":"2022-03-04T15:56:16.306Z","7.0.3":"2019-12-08T13:32:06.775Z","7.0.2":"2019-10-27T16:49:54.131Z","7.0.1":"2019-07-18T14:16:48.235Z","7.0.0":"2019-02-20T08:16:52.625Z"},"users":{},"author":{"name":"Remy Rylan","url":"https://github.com/RemyRylan"},"repository":{"type":"git","url":"git+https://github.com/RemyRylan/json-schema-typed.git"},"versions":{"8.0.2":{"name":"json-schema-typed","description":"JSON Schema TypeScript definitions with complete inline documentation.","license":"BSD-2-Clause","version":"8.0.2","homepage":"https://github.com/RemyRylan/json-schema-typed/tree/main/dist/node","repository":{"type":"git","url":"git+https://github.com/RemyRylan/json-schema-typed.git"},"author":{"name":"Remy Rylan","url":"https://github.com/RemyRylan"},"main":"./draft_2020_12.js","types":"./draft_2020_12.d.ts","type":"module","exports":{".":{"types":"./draft_2020_12.d.ts","default":"./draft_2020_12.js"},"./draft-07":{"types":"./draft_07.d.ts","default":"./draft_07.js"},"./draft-2019-09":{"types":"./draft_2019_09.d.ts","default":"./draft_2019_09.js"},"./draft-2020-12":{"types":"./draft_2020_12.d.ts","default":"./draft_2020_12.js"}},"keywords":["jsonschema","typescript","types","definitions","json","schema"],"gitHead":"613f3ab84c8e1b14de492534bfcb81d1499610a3","_id":"json-schema-typed@8.0.2","bugs":{"url":"https://github.com/RemyRylan/json-schema-typed/issues"},"_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"shasum":"e98ee7b1899ff4a184534d1f167c288c66bbeff4","size":37491,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-8.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-8.0.2.tgz"},"_npmUser":{"name":"remyrylan","email":"remyrylan@outlook.com"},"directories":{},"maintainers":[{"name":"remyrylan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/json-schema-typed_8.0.2_1763411424736_0.6438934808757768"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-17T20:30:24.942Z","publish_time":1763411424942,"_source_registry_name":"default","_cnpm_publish_time":1763411424942},"8.0.1":{"name":"json-schema-typed","description":"JSON Schema TypeScript definitions with complete inline documentation.","license":"BSD-2-Clause","version":"8.0.1","homepage":"https://github.com/jrylan/json-schema-typed/tree/main/dist/node","repository":{"type":"git","url":"git+https://github.com/jrylan/json-schema-typed.git"},"author":{"name":"Jeremy Rylan","url":"https://github.com/jrylan"},"main":"./draft-2020-12.js","type":"module","exports":{".":"./draft-2020-12.js","./draft-07":"./draft-07.js","./draft-2019-09":"./draft-2019-09.js","./draft-2020-12":"./draft-2020-12.js"},"keywords":["jsonschema","typescript","types","definitions","json","schema"],"bugs":{"url":"https://github.com/jrylan/json-schema-typed/issues"},"_id":"json-schema-typed@8.0.1","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"shasum":"826ee39e3b6cef536f85412ff048d3ff6f19dfa0","size":38947,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-8.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-8.0.1.tgz"},"_npmUser":{"name":"jrylan","email":"jeremyrylan@me.com"},"directories":{},"maintainers":[{"name":"remyrylan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_8.0.1_1646411072028_0.5902990912754889"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-04T16:30:30.751Z","publish_time":1646411072121,"_cnpm_publish_time":1646411072121},"8.0.0":{"name":"json-schema-typed","description":"JSON Schema TypeScript definitions with complete inline documentation.","license":"BSD-2-Clause","version":"8.0.0","homepage":"https://github.com/jrylan/json-schema-typed/tree/main/dist/node","repository":{"type":"git","url":"git+https://github.com/jrylan/json-schema-typed.git"},"author":{"name":"Jeremy Rylan","url":"https://github.com/jrylan"},"main":"./draft-2020-12.js","type":"module","exports":{".":"./draft-2020-12.js","./draft-07":"./draft-07.js","./draft-2019-09":"./draft-2019-09.js","./draft-2020-12":"./draft-2020-12.js"},"keywords":["jsonschema","typescript","types","definitions","json","schema"],"bugs":{"url":"https://github.com/jrylan/json-schema-typed/issues"},"_id":"json-schema-typed@8.0.0","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"shasum":"60092a3075a64582af8bf2d80a8433fea8f09393","size":38949,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-8.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-8.0.0.tgz"},"_npmUser":{"name":"jrylan","email":"jeremyrylan@me.com"},"directories":{},"maintainers":[{"name":"remyrylan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_8.0.0_1646409376182_0.3914138618195506"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-04T15:56:20.347Z","publish_time":1646409376306,"_cnpm_publish_time":1646409376306},"7.0.3":{"name":"json-schema-typed","description":"JSONSchema TypeScript definitions.","version":"7.0.3","license":"BSD-2-Clause","pika":true,"sideEffects":false,"keywords":["jsonschema","typescript"],"homepage":"https://github.com/typeslick/json-schema-typed","contributors":[{"name":"Austin Wright","email":"aaa@bzfx.net"},{"name":"Henry Andrews","email":"henry@cloudflare.com"},{"name":"Geraint Luff","email":"luffgd@gmail.com"},{"name":"Jay Rylan","email":"jay@jayrylan.com"}],"repository":{"type":"git","url":"git+https://github.com/typeslick/json-schema-typed.git"},"dependencies":{},"devDependencies":{"@babel/cli":"7.6.4","@babel/core":"7.6.4","@babel/runtime-corejs2":"7.6.3","@loomble/cspell-dictionary":"1.0.0","@microsoft/api-extractor":"7.3.4","@pika/pack":"0.5.0","@pika/plugin-build-node":"0.7.1","@pika/plugin-build-types":"0.7.1","@pika/plugin-build-web":"0.7.1","@pika/plugin-standard-pkg":"0.7.1","@types/babel__core":"7.1.3","@types/jest":"24.0.20","@types/jest-diff":"20.0.1","@types/node":"12.11.7","babel-core":"6.26.3","babel-jest":"24.9.0","babel-preset-slick":"7.0.4","core-js":"3.3.4","cspell":"4.0.31","deep-sort-object":"1.0.2","jest":"24.9.0","jest-serializer-path":"0.1.15","prettier":"1.18.2","tsconfig-slick":"3.0.2","tslint":"5.20.0","tslint-slick":"5.0.0","typedoc":"0.15.0","typedoc-plugin-markdown":"2.2.11","typescript":"3.6.4","typescript-tslint-plugin":"0.5.4"},"esnext":"dist-src/index.js","main":"dist-node/index.js","module":"dist-web/index.js","types":"dist-types/index.d.ts","bugs":{"url":"https://github.com/typeslick/json-schema-typed/issues"},"_id":"json-schema-typed@7.0.3","_nodeVersion":"12.11.1","_npmVersion":"6.13.1","dist":{"shasum":"23ff481b8b4eebcd2ca123b4fa0409e66469a2d9","size":12642,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-7.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-7.0.3.tgz"},"maintainers":[{"name":"remyrylan","email":""}],"_npmUser":{"name":"jayrylan","email":"jay@jayrylan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_7.0.3_1575811926620_0.21219147110214442"},"_hasShrinkwrap":false,"publish_time":1575811926775,"_cnpm_publish_time":1575811926775},"7.0.2":{"name":"json-schema-typed","description":"JSONSchema TypeScript definitions.","version":"7.0.2","license":"BSD-2-Clause","pika":true,"sideEffects":false,"keywords":["jsonschema","typescript"],"homepage":"https://github.com/typeslick/json-schema-typed","contributors":[{"name":"Austin Wright","email":"aaa@bzfx.net"},{"name":"Henry Andrews","email":"henry@cloudflare.com"},{"name":"Geraint Luff","email":"luffgd@gmail.com"},{"name":"Jay Rylan","email":"jay@jayrylan.com"}],"repository":{"type":"git","url":"git+https://github.com/typeslick/json-schema-typed.git"},"dependencies":{},"devDependencies":{"@babel/cli":"7.6.4","@babel/core":"7.6.4","@babel/runtime-corejs2":"7.6.3","@loomble/cspell-dictionary":"1.0.0","@microsoft/api-extractor":"7.3.4","@pika/pack":"0.5.0","@pika/plugin-build-node":"0.7.1","@pika/plugin-build-types":"0.7.1","@pika/plugin-build-web":"0.7.1","@pika/plugin-standard-pkg":"0.7.1","@types/babel__core":"7.1.3","@types/jest":"24.0.20","@types/jest-diff":"20.0.1","@types/node":"12.11.7","babel-core":"6.26.3","babel-jest":"24.9.0","babel-preset-slick":"7.0.4","core-js":"3.3.4","cspell":"4.0.31","deep-sort-object":"1.0.2","jest":"24.9.0","jest-serializer-path":"0.1.15","prettier":"1.18.2","tsconfig-slick":"3.0.2","tslint":"5.20.0","tslint-slick":"5.0.0","typedoc":"0.15.0","typedoc-plugin-markdown":"2.2.11","typescript":"3.6.4","typescript-tslint-plugin":"0.5.4"},"esnext":"dist-src/index.js","main":"dist-node/index.js","module":"dist-web/index.js","types":"dist-types/index.d.ts","bugs":{"url":"https://github.com/typeslick/json-schema-typed/issues"},"_id":"json-schema-typed@7.0.2","_nodeVersion":"12.11.1","_npmVersion":"6.12.0","dist":{"shasum":"926deb7535cfb321613ee136eaed70c1419c89b4","size":12674,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-7.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-7.0.2.tgz"},"maintainers":[{"name":"remyrylan","email":""}],"_npmUser":{"name":"jayrylan","email":"jay@jayrylan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_7.0.2_1572194993939_0.6048187901576443"},"_hasShrinkwrap":false,"publish_time":1572194994131,"_cnpm_publish_time":1572194994131},"7.0.1":{"name":"json-schema-typed","description":"JSONSchema TypeScript definitions.","version":"7.0.1","license":"bsd-2-clause","homepage":"https://github.com/typeslick/json-schema-typed","repository":{"type":"git","url":"git+https://github.com/typeslick/json-schema-typed.git"},"author":{"name":"Jay Rylan","url":"http://jayrylan.com/"},"contributors":[{"name":"Austin Wright","email":"aaa@bzfx.net"},{"name":"Henry Andrews","email":"henry@cloudflare.com"},{"name":"Geraint Luff","email":"luffgd@gmail.com"},{"name":"Jay Rylan","email":"jay@jayrylan.com"}],"main":"./src/index","keywords":["jsonschema","typescript"],"scripts":{"api-check":"npm run build && api-extractor run","build":"pack build","test":"jest","docs":"typedoc --theme markdown --out ./api-docs ./src"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","@loomble/cspell-dictionary":"^1.0.0","@microsoft/api-extractor":"^7.3.2","@pika/pack":"^0.4.0","@pika/plugin-build-node":"^0.4.0","@pika/plugin-build-types":"^0.4.0","@pika/plugin-build-web":"^0.4.0","@pika/plugin-standard-pkg":"^0.4.0","@types/babel__core":"^7.1.2","@types/jest":"^24.0.15","@types/jest-diff":"^20.0.1","@types/node":"^12.6.8","babel-core":"^6.26.3","babel-jest":"^24.8.0","babel-preset-slick":"^7.0.4","core-js":"^3.1.4","cspell":"^4.0.26","deep-sort-object":"^1.0.2","jest":"^24.8.0","jest-serializer-path":"^0.1.15","prettier":"^1.18.2","tsconfig-slick":"^3.0.2","tslint":"^5.18.0","tslint-slick":"^5.0.0","typedoc":"^0.14.2","typedoc-plugin-markdown":"^2.0.10","typescript":"^3.5.3","typescript-tslint-plugin":"^0.5.4","weak":"^1.0.1"},"@pika/pack":{"pipeline":[["@pika/plugin-standard-pkg",{"exclude":["**/__*__/**/*","**/website/**/*"]}],["@pika/plugin-build-node"],["@pika/plugin-build-web"],["@pika/plugin-build-types"]]},"gitHead":"f733d6f31d3a0217ad363957c7f0b257fbbd011e","bugs":{"url":"https://github.com/typeslick/json-schema-typed/issues"},"_id":"json-schema-typed@7.0.1","_nodeVersion":"11.8.0","_npmVersion":"6.10.1","dist":{"shasum":"5e56564b5a0950423e22b285a30ade219e38084d","size":27100,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-7.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-7.0.1.tgz"},"maintainers":[{"name":"remyrylan","email":""}],"_npmUser":{"name":"jayrylan","email":"jay@jayrylan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_7.0.1_1563459408077_0.1033237121002002"},"_hasShrinkwrap":false,"publish_time":1563459408235,"_cnpm_publish_time":1563459408235},"7.0.0":{"name":"json-schema-typed","description":"JSONSchema TypeScript definitions.","version":"7.0.0","license":"BSD-2-Clause","esnext":"dist-src/index.js","main":"dist-node/index.js","module":"dist-web/index.js","types":"dist-types/index.d.ts","pika":true,"sideEffects":false,"keywords":["jsonschema","typescript"],"homepage":"https://github.com/typeslick/json-schema-typed","contributors":[{"name":"Austin Wright","email":"aaa@bzfx.net"},{"name":"Henry Andrews","email":"henry@cloudflare.com"},{"name":"Geraint Luff","email":"luffgd@gmail.com"},{"name":"Jay Rylan","email":"jay@jayrylan.com"}],"repository":{"type":"git","url":"git+https://github.com/typeslick/json-schema-typed.git"},"dependencies":{},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/runtime-corejs2":"^7.2.0","@loomble/cspell-dictionary":"*","@microsoft/api-extractor":"^7.0.17","@pika/pack":"^0.3.2","@pika/plugin-build-node":"^0.3.11","@pika/plugin-build-types":"^0.3.11","@pika/plugin-build-web":"^0.3.11","@pika/plugin-standard-pkg":"^0.3.11","@types/babel__core":"^7.0.4","@types/jest":"^24.0.6","@types/jest-diff":"^20.0.1","@types/node":"^11.9.4","babel-core":"^7.0.0-bridge.0","babel-jest":"^24.1.0","babel-preset-slick":"^7.0.4","core-js":"^2.6.0","cspell":"^3.1.3","deep-sort-object":"^1.0.2","jest":"^24.1.0","jest-serializer-path":"^0.1.15","prettier":"^1.15.3","tsconfig-slick":"^3.0.2","tslint":"^5.11.0","tslint-slick":"^5.0.0","typedoc":"^0.14.2","typedoc-plugin-markdown":"^1.1.26","typescript":"^3.2.2","typescript-tslint-plugin":"^0.3.1","weak":"^1.0.1"},"bugs":{"url":"https://github.com/typeslick/json-schema-typed/issues"},"_id":"json-schema-typed@7.0.0","_nodeVersion":"11.8.0","_npmVersion":"6.7.0","dist":{"shasum":"714f3bb539637644b8cb9c99a097c4ee8f8e8c8f","size":11627,"noattachment":false,"key":"/json-schema-typed/-/json-schema-typed-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-schema-typed/download/json-schema-typed-7.0.0.tgz"},"maintainers":[{"name":"remyrylan","email":""}],"_npmUser":{"name":"jayrylan","email":"jay@jayrylan.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-typed_7.0.0_1550650612410_0.481378480813627"},"_hasShrinkwrap":false,"publish_time":1550650612625,"_cnpm_publish_time":1550650612625}},"readme":"[![npm](https://img.shields.io/npm/v/json-schema-typed.svg?style=flat-square)](https://npmjs.org/package/json-schema-typed)\r\n[![downloads-per-month](https://img.shields.io/npm/dm/json-schema-typed.svg?style=flat-square&label=npm%20downloads)](https://npmjs.org/package/json-schema-typed)\r\n[![License](https://img.shields.io/badge/license-BSD--2--Clause-blue.svg?style=flat-square)][license]\r\n\r\n# JSON Schema Typed\r\n\r\nJSON Schema TypeScript definitions with complete inline documentation.\r\n\r\n**NOTE:** This library only supports defining schemas. You will need a separate\r\nlibrary for data validation.\r\n\r\nThere are 3 JSON Schema drafts included in this package:\r\n\r\n- `draft-07`\r\n- `draft-2019-09`\r\n- `draft-2020-12`\r\n\r\n## Install\r\n\r\n```sh\r\nnpm install json-schema-typed\r\n```\r\n\r\n## Usage\r\n\r\n1. Chose which draft you'd like to import.\r\n\r\n- The main package export points to the latest supported stable draft, currently\r\n  `draft-2020-12`. Future releases that point the main package export to a new\r\n  draft will always incur a bump to the major semantic version.\r\n\r\n  ```ts\r\n  import { type JSONSchema } from \"json-schema-typed\";\r\n  ```\r\n\r\n- Or you can specify the exact draft you need.\r\n  ```ts\r\n  import { type JSONSchema } from \"json-schema-typed/draft-2020-12\";\r\n  ```\r\n\r\n2. Define a schema\r\n\r\n   ```ts\r\n   import { Format, type JSONSchema } from \"json-schema-typed\";\r\n\r\n   const schema: JSONSchema = {\r\n     properties: {\r\n       email: {\r\n         format: Format.Email,\r\n         type: \"string\",\r\n       },\r\n     },\r\n     type: \"object\",\r\n   };\r\n\r\n   // The JSONSchema namespace also provides type-specific narrowed interfaces\r\n   const stringSchema: JSONSchema.String = {\r\n     // Only { type: \"string\" } and common keywords are allowed\r\n     maxLength: 100,\r\n     type: \"string\",\r\n   };\r\n   ```\r\n\r\n## Upgrading\r\n\r\nVersion `8.0.0` has breaking changes from the previous release.\r\n\r\n- Now a\r\n  [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).\r\n- Many exports were renamed. The table below reflects the new export names.\r\n  These are considered final and unlikely to change in future releases.\r\n- The `JSONSchema` type was changed from an `interface` to a `type` which is a\r\n  mixed union that allows `boolean` values in order to properly align with the\r\n  JSON Schema spec. If you were previously extending the `JSONSchema` interface,\r\n  you can access the `interface` directly with `JSONSchema.Interface`.\r\n- The previous main package export pointed to Draft 7. Import it directly if you\r\n  need to continue using it:\r\n  ```ts\r\n  import { type JSONSchema } from \"json-schema-typed/draft-07\";\r\n  ```\r\n\r\n## Exports supported in each draft module\r\n\r\n| Name              | Type            | Purpose                                                            |\r\n| ----------------- | --------------- | ------------------------------------------------------------------ |\r\n| `$schema`         | `string`        | Draft meta schema URL that can be used with the `$schema` keyword. |\r\n| `ContentEncoding` | Enum object     | String content encoding strategies.                                |\r\n| `draft`           | `string`        | Draft version.                                                     |\r\n| `Format`          | Enum object     | String formats.                                                    |\r\n| `JSONSchema`      | TypeScript Type | Used to define a JSON Schema.                                      |\r\n| `keywords`        | `string[]`      | All the keywords for the imported draft.                           |\r\n| `TypeName`        | Enum object     | Simple type names for the `type` keyword.                          |\r\n\r\n## Versioning\r\n\r\nThis library follows [semantic versioning](https://semver.org).\r\n\r\n---\r\n\r\n## Maintainers\r\n\r\n- [Remy Rylan](https://github.com/RemyRylan)\r\n\r\n## License\r\n\r\n[BSD-2-Clause][license]\r\n\r\n[license]: https://github.com/RemyRylan/json-schema-typed/blob/main/dist/node/LICENSE.md\r\n","_attachments":{},"homepage":"https://github.com/RemyRylan/json-schema-typed/tree/main/dist/node","bugs":{"url":"https://github.com/RemyRylan/json-schema-typed/issues"},"license":"BSD-2-Clause"}