{"id":13834670,"url":"https://github.com/marionebl/ts-transform-json-schema","last_synced_at":"2025-09-14T19:16:04.964Z","repository":{"id":33024533,"uuid":"150176700","full_name":"marionebl/ts-transform-json-schema","owner":"marionebl","description":"Generate inline JSON schema from TypeScript types","archived":false,"fork":false,"pushed_at":"2023-01-04T21:42:37.000Z","size":511,"stargazers_count":26,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-27T07:33:46.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marionebl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-24T22:31:39.000Z","updated_at":"2023-09-08T17:45:25.000Z","dependencies_parsed_at":"2023-01-14T23:15:30.989Z","dependency_job_id":null,"html_url":"https://github.com/marionebl/ts-transform-json-schema","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marionebl%2Fts-transform-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marionebl%2Fts-transform-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marionebl%2Fts-transform-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marionebl%2Fts-transform-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marionebl","download_url":"https://codeload.github.com/marionebl/ts-transform-json-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234832661,"owners_count":18893879,"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":[],"created_at":"2024-08-04T14:00:50.693Z","updated_at":"2025-01-20T17:50:46.992Z","avatar_url":"https://github.com/marionebl.png","language":"TypeScript","funding_links":[],"categories":["Transformers"],"sub_categories":["General transformers"],"readme":"# ts-transform-json-schema\n\n* 🌳 Generate inline JSON schema from TypeScript types\n\n## Example\n\n### In\n\n```ts\nimport * as JsonSchema from \"ts-transform-json-schema\";\n\nexport interface SomeInterface {\n  a: string;\n  b: number;\n  c?: boolean;\n}\n\nexport const schema = JsonSchema.fromType\u003cSomeInterface\u003e({\n  additionalProperties: false\n});\n```\n\n```js\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"target\": \"es2015\",\n    \"plugins\": [\n      {\n        \"transform\": \"ts-transform-json-schema\",\n        \"type\": \"program\"\n      }\n    ]\n  }\n}\n```\n\n### Out\n\n```ts\nimport * as JsonSchema from \"ts-transform-json-schema\";\nexport const schema = {\n  additionalProperties: false,\n  type: \"object\", \n  properties: { \n    a: { type: \"string\" }, \n    b: { type: \"number\" }, \n    c: { type: \"boolean\" } \n  }, \n  $schema: \"http://json-schema.org/draft-07/schema#\" \n};\n```\n\n## Installation\n\n```sh\nnpm install ts-transform-json-schema ttypescript --save-dev\n```\n\n## Usage\n\n\n```js \n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"target\": \"es2015\",\n    \"plugins\": [\n      {\n        \"transform\": \"ts-transform-json-schema\",\n        \"type\": \"program\"\n      }\n    ]\n  }\n}\n```\n\nSee [TTypeScript](https://github.com/cevek/ttypescript#how-to-use) for docs about integration with other toolchains.\n\n---\n\nSee [./example](./example) for a basic setup based on [TTypeScript](https://github.com/cevek/ttypescript)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarionebl%2Fts-transform-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarionebl%2Fts-transform-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarionebl%2Fts-transform-json-schema/lists"}