{"_id":"@apployees/json-schema-to-typescript","_rev":"4-4d0644644ae7b7f2d6251f76692fd3b6","name":"@apployees/json-schema-to-typescript","dist-tags":{"latest":"9.1.4"},"versions":{"9.1.1":{"name":"@apployees/json-schema-to-typescript","version":"9.1.1","description":"compile json schema to typescript typings","main":"dist/src/index.js","bin":{"json2ts":"dist/src/cli.js"},"typings":"dist/src/index.d.ts","engines":{"node":">=10.0.0"},"scripts":{"build":"npm run clean && mkdir dist && npm run build:browser && npm run build:server","build:browser":"browserify src/index.ts -s jstt -p tsify > dist/bundle.js","build:server":"tsc -d","clean":"shx rm -rf dist","lint":"eslint src/*.ts test/*.ts","tdd":"concurrently -r -p '' -k 'npm run watch' 'npm run watch:test'","test":"ava --timeout=300s --verbose","stresstest":"seq 1 10 | xargs -I{} npm test","prepublishOnly":"npm test","pretest":"npm run build","watch":"tsc -w","watch:test":"ava -w"},"repository":{"type":"git","url":"git+https://github.com/bcherny/json-schema-to-typescript.git"},"keywords":["json","schema","typescript","compile","transpile","api","interface","typing","share"],"author":{"name":"Boris Cherny","email":"boris@performancejs.com","url":"http://performancejs.com/"},"license":"MIT","bugs":{"url":"https://github.com/bcherny/json-schema-to-typescript/issues"},"homepage":"https://github.com/bcherny/json-schema-to-typescript#readme","dependencies":{"@types/json-schema":"^7.0.4","json-schema-ref-parser":"^9.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.15"},"devDependencies":{"@types/lodash":"^4.14.150","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","ava":"^3.8.1","browserify":"^16.5.1","browserify-shim":"^3.8.14","concurrently":"^5.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","rimraf":"^3.0.2","shx":"^0.3.2","tsify":"^4.0.1","typescript":"^3.8.3"},"ava":{"files":["./dist/test/test.js"],"ignoredByWatcher":["./src"],"snapshotDir":"./test/__snapshots__","vebose":true},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"prettier":"global:prettier"},"gitHead":"1ec105d1f00f23969bd057fe151ff952a7280e3d","_id":"@apployees/json-schema-to-typescript@9.1.1","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ZxFTdRiyDr5x2j4W0gca9QCJDCJUwAonwQYWN6OO9xaeV46Q04shvLk3IGsLdgmCJDe5wx7vdc/GCCpT9m00FA==","shasum":"8965c9266a3eeec6a857ed8f743e688b482adeaa","tarball":"https://registry.npmjs.org/@apployees/json-schema-to-typescript/-/json-schema-to-typescript-9.1.1.tgz","fileCount":46,"unpackedSize":1221805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD80LCRA9TVsSAnZWagAAMVIP/2RepnhHPkD3g7LXPyl5\nEdPu/3EpxilwTvJscwh85QyStFkkMkceJbr1YY6XsnEDblfZJM4ef1FeUHS9\nTFw+PyTARCR0ta6s6Fv7jW984XfP9tfIjgQ3AEcI6ghOvvADE1Ki1OEco5aF\nprCvbIe7BEHamP4Df5iHkYPwKx69eEQTCXQU8zDh3TGgJ4DX2ZgdabFT0ny/\nRUjRAWoTmD7dBetREkcWBTZGJa2gEndRKoN7Lk0stRZURXx93MFcpG9cZK5Q\nMpaPBVrIfarYDNqiuQt+HVqwaMGsre2COikOEqh8PMwzazrzd5HOjYOyf6Ad\nmEBmZ+FL8tTEF2qoRvxl3U6vJkpVRccCRlmm8TmalbdVfMlKobXjiGCQITIk\n9zM6ffNJ6WCcMS7CZTeiUUmGJNyhbNelUFZWpjN5MlDxyhiLv658B040clvt\nBQ0b4Xc2ECuTXKjSrTuH7uY0mpydbyQfShlyRvOl3adu1yArqf6gmRwV0wy5\nolmSf8Ktnd03VW6rkLb8gXqYobikkONupKbUpK5dxA4+T77tfeE23dOJAB9D\n54u5kBI4xE0E9AhjXKJoj/VOggQg3mkitGv26itSVCIGukclfFgPH/7WnTey\ngV8QNdWDxgA04GXZJ+czIGVMEqmGe3bhh/3BnIAG5sk5lYwsKJTjX8oxP0/F\n8k7e\r\n=Us6P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd9JSpQWMWZHpXdQ0zj6e5EUZV/mrhZwcTmUUfKfU4WAIhAL1RskeDT/nL348rlFiEfy/yKZZiMzd8q29UGrsbk2No"}]},"maintainers":[{"name":"atifsyedali","email":"atifsyedali@gmail.com"}],"_npmUser":{"name":"atifsyedali","email":"atifsyedali@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-to-typescript_9.1.1_1594871051341_0.06123554060366798"},"_hasShrinkwrap":false},"9.1.2":{"name":"@apployees/json-schema-to-typescript","version":"9.1.2","description":"compile json schema to typescript typings","main":"dist/src/index.js","typings":"dist/src/index.d.ts","engines":{"node":">=10.0.0"},"scripts":{"build":"yarn clean && mkdir dist && yarn build:browser","build:browser":"browserify src/index.ts -s jstt -p tsify > dist/bundle.js","clean":"shx rm -rf dist","lint":"eslint src/*.ts test/*.ts","tdd":"concurrently -r -p '' -k 'yarn watch' 'yarn watch:test'","test":"ava --timeout=300s --verbose","stresstest":"seq 1 10 | xargs -I{} yarn test","pretest":"yarn build","watch":"tsc -w","watch:test":"ava -w"},"repository":{"type":"git","url":"git+https://github.com/Apployees/json-schema-to-typescript.git"},"keywords":["json","schema","typescript","compile","transpile","api","interface","typing","share"],"author":{"name":"Boris Cherny","email":"boris@performancejs.com","url":"http://performancejs.com/"},"license":"MIT","bugs":{"url":"https://github.com/bcherny/json-schema-to-typescript/issues"},"homepage":"https://github.com/Apployees/json-schema-to-typescript#readme","dependencies":{"@types/json-schema":"^7.0.4","json-schema-ref-parser":"^9.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.15"},"devDependencies":{"@types/lodash":"^4.14.150","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","ava":"^3.8.1","browserify":"^16.5.1","browserify-shim":"^3.8.14","concurrently":"^5.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","rimraf":"^3.0.2","shx":"^0.3.2","tsify":"^4.0.1","typescript":"^3.8.3"},"ava":{"files":["./dist/test/test.js"],"ignoredByWatcher":["./src"],"snapshotDir":"./test/__snapshots__","vebose":true},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"prettier":"global:prettier"},"_id":"@apployees/json-schema-to-typescript@9.1.2","dist":{"shasum":"84d6252d4077447375ad315657794a20cbef1e79","integrity":"sha512-9dUPNsfpcOGPFXWTFXaBUEMQr3H3B3npVhzBMXz6dMwh3BKP/NAPmtC37Um2HAg6hOH224fGhcBR1JNO5LLoJg==","tarball":"https://registry.npmjs.org/@apployees/json-schema-to-typescript/-/json-schema-to-typescript-9.1.2.tgz","fileCount":31,"unpackedSize":1155752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfg+Y2CRA9TVsSAnZWagAArD8P/2v31372+Rm+L+Y0rQh/\n3qQ/1GzzGzoh92JxGIVKQoxFe9SGgYXfNUxM3ZgEy8y49WA2ps+mkSquWKXJ\nqrREm3NoajVBPgsjdCpbzIGQzfHyHAWpOltAXB4dCBwECRYUCdaTd0nNCvXW\nxOKQA5sW25MOUlU9XILNvMvKP0czQ+DxIzmIsA39UP+qmOfndxa3epQ2E8FT\n1kFA1cuZ/kV7UYxW2NYhAUuI/oM4kQYm1AkMwZSnAmQzn8SKJuWdh1dZmTAy\nOT5ayNm6pwY6TtZtJFx9KPjybui1OvFzOiuY2sgyPUcfZKLnaaf1T7hau0Ch\ns5L6n1lqbbKg4qXWoSLydYcDMQ7r0jfPLtnh9KHJJkOFvxQl+ymSSAX/m7e+\nEYMViVNJbNuYq+wIL0GNMgqjqDcueXx2dCCi9y840nLKTHiTjHnmEHit3wyQ\nhTHsigMeTMv4CGfkLs5Acd/GmSWGerOG7IrCEY+ch9k97rfsDUxbVrlB4RT+\nsfgole9C8gzjjLtREqiPrkxSuwHkw4Z/Rt/T3vS384Uyn6fjpJZnL1zoWnqS\nGMBrb0hQyLuIIUpGPMUl02TIZ2hFoGKhuFLfY31FbWIl+qaEEckRrtZG7QXi\nL1X8QfLiDH7Avdb+0QgVbr0En9v4kLBr7E4ljFz6XTRfudtcL6+mzhG9uXtQ\n9NX+\r\n=CQyU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSJ2F8XlXD4cg9bWFHuanKqpVtQORdcH5zv6F8siAMiQIhAK/pai3LGRQAFw9x4A9UxMogFB820WZIGaD/grBOKjjV"}]},"maintainers":[{"name":"atifsyedali","email":"atifsyedali@gmail.com"}],"_npmUser":{"name":"atifsyedali","email":"atifsyedali@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-to-typescript_9.1.2_1602479669993_0.7554427029935407"},"_hasShrinkwrap":false},"9.1.3":{"name":"@apployees/json-schema-to-typescript","version":"9.1.3","description":"compile json schema to typescript typings","main":"dist/bundle.js","typings":"dist/src/index.d.ts","engines":{"node":">=10.0.0"},"scripts":{"build":"yarn clean && mkdir dist && yarn build:browser","build:browser":"browserify src/index.ts -s jstt -p tsify > dist/bundle.js && tsc -d","clean":"shx rm -rf dist","lint":"eslint src/*.ts test/*.ts","tdd":"concurrently -r -p '' -k 'yarn watch' 'yarn watch:test'","test":"ava --timeout=300s --verbose","stresstest":"seq 1 10 | xargs -I{} yarn test","pretest":"yarn build","watch":"tsc -w","watch:test":"ava -w"},"repository":{"type":"git","url":"git+https://github.com/Apployees/json-schema-to-typescript.git"},"keywords":["json","schema","typescript","compile","transpile","api","interface","typing","share"],"author":{"name":"Boris Cherny","email":"boris@performancejs.com","url":"http://performancejs.com/"},"license":"MIT","bugs":{"url":"https://github.com/bcherny/json-schema-to-typescript/issues"},"homepage":"https://github.com/Apployees/json-schema-to-typescript#readme","dependencies":{"@types/json-schema":"^7.0.4","json-schema-ref-parser":"^9.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.15"},"devDependencies":{"@types/lodash":"^4.14.150","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","ava":"^3.8.1","browserify":"^16.5.1","browserify-shim":"^3.8.14","concurrently":"^5.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","rimraf":"^3.0.2","shx":"^0.3.2","tsify":"^4.0.1","typescript":"^3.8.3"},"ava":{"files":["./dist/test/test.js"],"ignoredByWatcher":["./src"],"snapshotDir":"./test/__snapshots__","vebose":true},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"prettier":"global:prettier"},"gitHead":"70e722c51e91aa98b922586db815c2488f6b0ee4","_id":"@apployees/json-schema-to-typescript@9.1.3","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-3wJs1hiSna1onhlel0vrWscy1MMMlkYpZ3SIFzC/bG17qklWSlwHRjEDo57EkYI8vUibstdF3i78g3dSNZf/CA==","shasum":"0a3396a851d159aae1704ccb8df6179d206dec23","tarball":"https://registry.npmjs.org/@apployees/json-schema-to-typescript/-/json-schema-to-typescript-9.1.3.tgz","fileCount":46,"unpackedSize":1220246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhA5mCRA9TVsSAnZWagAA3AAQAJBHChfH7r+Mm2pY9WX2\nqjp6NJfGdXNzOf19GlwtDcOlwq4SAVWlLMGjDt1rbCyyhzDVo7nXu3q0+rqR\njbKjeUaBaWSYewNFa33x2uUcYqXcYpNk+c8bs7ADDc49Kg0hHxjeAd4BHzqm\nq9NiF9n1oZo4XEzzNNvynUYoex4w1NrfYQayBBLSbK+p7a24Zh81AwG6GnLW\nMEbNJQ3L11h3fZfXVh+SLc6MZghCcOKZ8f1+yC9aVsCTG+/8rzuhebVQPAEN\nsk8ujg2fNs1HJ7FTQq/uVmrcE/bijFTtX8V5CoaauqN0kEcBwONcZjSrKqi6\nYiWTeIa++tXT8fCSLt+xZLdokT2irpxTLG1ngWSjGspkL8MJeTgpRfA+HZ2C\nS2eO/QNJlV9NLTsir1MbdIqXcm7a7e7H805QuSiz/A0atQ59CnAZ1VrZ5Zx8\n5wzDpXNUmPUt6FUcILIJWMFovNUf5Jka5TtTaqLaY8efL2ciFiLIwQ3kUsOU\n5di5cOiImfOpodzCsCOFNTlbG/X8zlMn4wJKSJUmsXkbxHltHcvCNdmw8OAI\nVVtQL6fulChtVq6zVZD+eS6Ev3jMBNbQPGxABbgSIbifIzB2b4m0Bl+kIiS0\nC6gOBH3s7YYDDmnhh4Iz0+mVwi8jaMEiHHbMjqPo359AtHpq6Q9+QGu1OJe1\nZxZ5\r\n=yI6m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMplu0ykvf5vRS59wFsfj14Xf/B92wEOEdbJmnVCIVuAiAx5SUt4add+Du86xV+sIS22hpONi2nbuSl6tGxpiDvfQ=="}]},"maintainers":[{"name":"atifsyedali","email":"atifsyedali@gmail.com"}],"_npmUser":{"name":"atifsyedali","email":"atifsyedali@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-to-typescript_9.1.3_1602489958294_0.4819064114475735"},"_hasShrinkwrap":false},"9.1.4":{"name":"@apployees/json-schema-to-typescript","version":"9.1.4","description":"compile json schema to typescript typings","main":"dist/bundle.js","typings":"dist/src/index.d.ts","engines":{"node":">=10.0.0"},"scripts":{"build":"yarn clean && mkdir dist && yarn build:browser","build:browser":"browserify src/index.ts -s jstt -p tsify > dist/bundle.js && tsc -d","clean":"shx rm -rf dist","lint":"eslint src/*.ts test/*.ts","tdd":"concurrently -r -p '' -k 'yarn watch' 'yarn watch:test'","test":"ava --timeout=300s --verbose","stresstest":"seq 1 10 | xargs -I{} yarn test","pretest":"yarn build","watch":"tsc -w","watch:test":"ava -w"},"repository":{"type":"git","url":"git+https://github.com/Apployees/json-schema-to-typescript.git"},"keywords":["json","schema","typescript","compile","transpile","api","interface","typing","share"],"author":{"name":"Boris Cherny","email":"boris@performancejs.com","url":"http://performancejs.com/"},"license":"MIT","bugs":{"url":"https://github.com/bcherny/json-schema-to-typescript/issues"},"homepage":"https://github.com/Apployees/json-schema-to-typescript#readme","dependencies":{"@types/json-schema":"^7.0.4","json-schema-ref-parser":"^9.0.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.15"},"devDependencies":{"@types/lodash":"^4.14.150","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","ava":"^3.8.1","browserify":"^16.5.1","browserify-shim":"^3.8.14","concurrently":"^5.2.0","eslint":"^6.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","rimraf":"^3.0.2","shx":"^0.3.2","tsify":"^4.0.1","typescript":"^3.8.3"},"ava":{"files":["./dist/test/test.js"],"ignoredByWatcher":["./src"],"snapshotDir":"./test/__snapshots__","vebose":true},"browserify":{"transform":["browserify-shim"]},"browserify-shim":{"prettier":"global:prettier"},"gitHead":"70e722c51e91aa98b922586db815c2488f6b0ee4","_id":"@apployees/json-schema-to-typescript@9.1.4","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-lEDn3abswuUFDb8Ot4cDf3MyriXI1654a5ayEI1UVUs9s2qHjnLBAGxnuawqaofVlQKcYkWEu3XoMSp9i4bYDg==","shasum":"e4ffa2142ff89b03fb0c5b804582bd3579c3798b","tarball":"https://registry.npmjs.org/@apployees/json-schema-to-typescript/-/json-schema-to-typescript-9.1.4.tgz","fileCount":46,"unpackedSize":1220482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhA+7CRA9TVsSAnZWagAABe0P/RY7G+EzYuusu2Yzi5Jd\n/2NEW0sk//Uo/zIrwepQw/jYeMYQUD4lEDlWua/gEiPTuW2Nr4aCVufm1Ndl\n3fsLKl9D6HnEnZ5B+VTFxOeBeHO/QK+gdJFNXTWWFuDiedY5Y3anldGkRoc0\nRDyaPDMH5P2hwuK4Gr97JJN4zc21lUUyW1pURiDoW4qpGxGRZ+ICnNqpm8K6\nScx1iBPXHviBrvPJzP0JYwcipwYfjkGgkmt7LwQMU0NSanS81i4XcdbhK0Bh\nDZ/ZM92rwqrt0HY9Ks+1WqTEZ37VdeMJeEsg4RKHvDzRlsKlGZK/IoaXViL3\nyoIe4g06whWFgtR1EfJd/dr/3cTALtaj3qZIg5oI5r9hg3TOGIOWnUgZAs9o\n85FxpCR9/V7R/1mzjgxBwcNE9oNiGc1W2CAEQrx5aBQBgEVkeM6v+cn64rX1\nJ5rftfZLUZaZQVTv0KR/zGkElbZoRPi0i4pI564Shr2Hj7fda1fRzHfxCJQf\nChWEQJV/dUjxCX0Q4ktqsUNlbaU6POWirLmJjal9PFodzdDIWn430U0tWH/f\nouVeU2NIDwHaerd86JO+dqe35uVU/Zg5n+6fKJ7jOsTIspp/zKMUEehLYKAo\nbpM2ICi0PHBqDIKU80ZAUXEZkP2n5CqPnrDwkY6X8XVEZ9s5UwhIyUVVOX1M\nC+Qc\r\n=EkhE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2tkj4X92wI8IvLv+deahsnmfYiNUww1ZLCTE7AT5/kAiEAly4on5Eu3jPpyFUViAh+gmdGdZPF7kCCLW3r9jvfzY8="}]},"maintainers":[{"name":"atifsyedali","email":"atifsyedali@gmail.com"}],"_npmUser":{"name":"atifsyedali","email":"atifsyedali@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-to-typescript_9.1.4_1602490299274_0.9095584194518169"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-16T03:44:11.074Z","9.1.1":"2020-07-16T03:44:11.503Z","modified":"2022-04-04T15:02:38.750Z","9.1.2":"2020-10-12T05:14:30.151Z","9.1.3":"2020-10-12T08:05:58.484Z","9.1.4":"2020-10-12T08:11:39.533Z"},"maintainers":[{"name":"atifsyedali","email":"atifsyedali@gmail.com"}],"description":"compile json schema to typescript typings","homepage":"https://github.com/Apployees/json-schema-to-typescript#readme","keywords":["json","schema","typescript","compile","transpile","api","interface","typing","share"],"repository":{"type":"git","url":"git+https://github.com/Apployees/json-schema-to-typescript.git"},"author":{"name":"Boris Cherny","email":"boris@performancejs.com","url":"http://performancejs.com/"},"bugs":{"url":"https://github.com/bcherny/json-schema-to-typescript/issues"},"license":"MIT","readme":"Fork of bcherny/json-schema-to-typescript targeting browser only. Removed all cli, node, and file-system dependencies.\n\n# json-schema-to-typescript [![npm]](https://www.npmjs.com/package/@apployees/json-schema-to-typescript) [![mit]](https://opensource.org/licenses/MIT)\n\n[npm]: https://img.shields.io/npm/v/json-schema-to-typescript.svg?style=flat-square\n[mit]: https://img.shields.io/npm/l/json-schema-to-typescript.svg?style=flat-square\n\n> Compile json schema to typescript typings\n\n## Example\n\nInput:\n```json\n{\n  \"title\": \"Example Schema\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"firstName\": {\n      \"type\": \"string\"\n    },\n    \"lastName\": {\n      \"type\": \"string\"\n    },\n    \"age\": {\n      \"description\": \"Age in years\",\n      \"type\": \"integer\",\n      \"minimum\": 0\n    },\n    \"hairColor\": {\n      \"enum\": [\"black\", \"brown\", \"blue\"],\n      \"type\": \"string\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"firstName\", \"lastName\"]\n}\n```\n\nOutput:\n```ts\nexport interface ExampleSchema {\n  firstName: string;\n  lastName: string;\n  /**\n   * Age in years\n   */\n  age?: number;\n  hairColor?: \"black\" | \"brown\" | \"blue\";\n}\n```\n\n## Installation\n\n```sh\n# Using Yarn:\nyarn add json-schema-to-typescript\n\n# Or, using NPM:\nnpm install json-schema-to-typescript --save\n```\n\n## Usage\n\n```js\nimport { compile } from 'json-schema-to-typescript'\n\n// compile a JS object\nlet mySchema = {\n  properties: [...]\n}\ncompile(mySchema, 'MySchema')\n  .then(ts => ...)\n```\n\nSee [server demo](example) and [browser demo](https://github.com/bcherny/json-schema-to-typescript-browser) for full examples.\n\n## Options\n\n`compileFromFile` and `compile` accept options as their last argument (all keys are optional):\n\n| key | type | default | description |\n|-|-|-|-|\n| bannerComment | string | `\"/* tslint:disable */\\n/**\\n* This file was automatically generated by json-schema-to-typescript.\\n* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,\\n* and run json-schema-to-typescript to regenerate this file.\\n*/\"` | Disclaimer comment prepended to the top of each generated file |\n| declareExternallyReferenced | boolean | `true` | Declare external schemas referenced via `$ref`? |\n| enableConstEnums | boolean | `true` | Prepend enums with [`const`](https://www.typescriptlang.org/docs/handbook/enums.html#computed-and-constant-members)? |\n| ignoreMinAndMaxItems | boolean | `false` | Ignore maxItems and minItems for `array` types, preventing tuples being generated. |\n| unknownAny | boolean | `true` | Use `unknown` instead of `any` where possible |\n| unreachableDefinitions | boolean | `false` | Generates code for `definitions` that aren't referenced by the schema. |\n| strictIndexSignatures | boolean | `false` | Append all index signatures with `\\| undefined` so that they are strictly typed. |\n| $refOptions | object | `{}` | [$RefParser](https://github.com/BigstickCarpet/json-schema-ref-parser) Options, used when resolving `$ref`s |\n\n## Tests\n\n`npm test`\n\n## Features\n\n- [x] `title` => `interface`\n- [x] Primitive types:\n  - [x] array\n  - [x] homogeneous array\n  - [x] boolean\n  - [x] integer\n  - [x] number\n  - [x] null\n  - [x] object\n  - [x] string\n  - [x] homogeneous enum\n  - [x] heterogeneous enum\n- [x] Non/extensible interfaces\n- [ ] Custom JSON-schema extensions\n- [x] Nested properties\n- [x] Schema definitions\n- [x] [Schema references](http://json-schema.org/latest/json-schema-core.html#rfc.section.7.2.2)\n- [x] Local (filesystem) schema references\n- [x] External (network) schema references\n- [x] Add support for running in browser\n- [x] default interface name\n- [x] infer unnamed interface name from filename\n- [x] `allOf` (\"intersection\")\n- [x] `anyOf` (\"union\")\n- [x] `oneOf` (treated like `anyOf`)\n- [x] `maxItems` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L166))\n- [x] `minItems` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L165))\n- [x] `additionalProperties` of type\n- [x] `patternProperties` (partial support)\n- [x] [`extends`](https://github.com/json-schema/json-schema/wiki/Extends/014e3cd8692250baad70c361dd81f6119ad0f696)\n- [x] `required` properties on objects ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L130))\n- [ ] `validateRequired` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L124))\n- [x] literal objects in enum ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L236))\n- [x] referencing schema by id ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L331))\n- [x] custom typescript types via `tsType`\n\n## Custom schema properties:\n\n- `tsType`: Overrides the type that's generated from the schema. Useful for forcing a type to `any` or when using non-standard JSON schema extensions ([eg](https://github.com/sokra/json-schema-to-typescript/blob/f1f40307cf5efa328522bb1c9ae0b0d9e5f367aa/test/e2e/customType.ts)).\n- `tsEnumNames`: Overrides the names used for the elements in an enum. Can also be used to create string enums ([eg](https://github.com/johnbillion/wp-json-schemas/blob/647440573e4a675f15880c95fcca513fdf7a2077/schemas/properties/post-status-name.json)).\n\n## Not expressible in TypeScript:\n\n- `dependencies` ([single](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L261), [multiple](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L282))\n- `divisibleBy` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L185))\n- [`format`](https://github.com/json-schema/json-schema/wiki/Format) ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L209))\n- `multipleOf` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L186))\n- `maximum` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L183))\n- `minimum` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L182))\n- `maxProperties` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L113))\n- `minProperties` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L112))\n- `not`/`disallow`\n- `oneOf` (\"xor\", use `anyOf` instead)\n- `pattern` ([string](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L203), [regex](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L207))\n- `uniqueItems` ([eg](https://github.com/tdegrunt/jsonschema/blob/67c0e27ce9542efde0bf43dc1b2a95dd87df43c3/examples/all.js#L172))\n\n## Further Reading\n\n- JSON-schema spec: https://tools.ietf.org/html/draft-zyp-json-schema-04\n- JSON-schema wiki: https://github.com/json-schema/json-schema/wiki\n- JSON-schema test suite: https://github.com/json-schema/JSON-Schema-Test-Suite/blob/node\n- TypeScript spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md\n\n## Who uses JSON-Schema-to-TypeScript?\n\n- [AWS](https://github.com/aws/aws-toolkit-vscode), [AWSLabs](https://github.com/awslabs/cdk8s)\n- [FormatJS](https://github.com/formatjs/formatjs)\n- [Microsoft](https://github.com/microsoft/mixed-reality-extension-sdk)\n- [Sourcegraph](https://github.com/sourcegraph/sourcegraph)\n- [Stryker](https://github.com/stryker-mutator/stryker)\n- [Webpack](https://github.com/webpack/webpack)\n- [See more](https://github.com/bcherny/json-schema-to-typescript/network/dependents?package_id=UGFja2FnZS0xNjUxOTM5Mg%3D%3D)\n","readmeFilename":"README.md"}