{"id":13560799,"url":"https://github.com/xiag-ag/typescript-to-json-schema","last_synced_at":"2025-07-28T00:04:33.579Z","repository":{"id":16769022,"uuid":"80603714","full_name":"xiag-ag/typescript-to-json-schema","owner":"xiag-ag","description":"Generate JSON schema from your Typescript sources","archived":false,"fork":false,"pushed_at":"2022-12-07T18:07:38.000Z","size":313,"stargazers_count":71,"open_issues_count":14,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T08:33:48.510Z","etag":null,"topics":["cli","generator","json","json-schema","schema","ts","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiag-ag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-01T09:02:33.000Z","updated_at":"2025-03-03T22:20:42.000Z","dependencies_parsed_at":"2023-01-13T19:00:53.914Z","dependency_job_id":null,"html_url":"https://github.com/xiag-ag/typescript-to-json-schema","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiag-ag%2Ftypescript-to-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiag-ag%2Ftypescript-to-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiag-ag%2Ftypescript-to-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiag-ag%2Ftypescript-to-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiag-ag","download_url":"https://codeload.github.com/xiag-ag/typescript-to-json-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246925994,"owners_count":20855997,"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":["cli","generator","json","json-schema","schema","ts","typescript"],"created_at":"2024-08-01T13:00:49.619Z","updated_at":"2025-04-03T16:31:08.815Z","avatar_url":"https://github.com/xiag-ag.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# typescript-to-json-schema\n\n[![npm version](https://img.shields.io/npm/v/typescript-to-json-schema.svg)](https://www.npmjs.com/package/typescript-to-json-schema)\n[![Build Status](https://travis-ci.org/xiag-ag/typescript-to-json-schema.svg?branch=master)](https://travis-ci.org/xiag-ag/typescript-to-json-schema)\n[![Coverage Status](https://coveralls.io/repos/github/xiag-ag/typescript-to-json-schema/badge.svg?branch=master)](https://coveralls.io/github/xiag-ag/typescript-to-json-schema?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nInspired by [`YousefED/typescript-json-schema`](https://github.com/YousefED/typescript-json-schema). Here's the differences list:\n\n* this implementation does not use `typeChecker.getTypeAtLocation()` (so probably it keeps correct type aliases)\n* the following features are not supported yet:\n  * `class` types\n  * conditional types\n* processing AST and formatting JSON schema have been split into two independent steps\n* not exported types, interfaces, enums are not exposed in the `definitions` section in the JSON schema\n\n## Usage\n\n```bash\nnpm install typescript-to-json-schema\n./node_modules/.bin/typescript-to-json-schema \\\n    --path 'my/project/**.*.ts' \\\n    --type 'My.Type.Full.Name' \\\n    --expose 'export' \\\n    --topRef 'yes' \\\n    --jsDoc 'extended'\n```\n\n## Current state\n\n* `interface` types\n* `enum` types\n* `union`, `tuple`, `type[]` types\n* `string`, `boolean`, `number` types\n* `\"value\"`, `123`, `true`, `false`, `null`, `undefined` literals\n* type aliases\n* generics\n* `typeof`\n* `keyof`\n\n## Debug\n\n`npm run debug -- test/programs/type-alias-single/main.ts --aliasRefs true MyString`\n\nAnd connect via the debugger protocol.\n\n[AST Explorer](https://astexplorer.net/) is amazing for developers of this tool!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiag-ag%2Ftypescript-to-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiag-ag%2Ftypescript-to-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiag-ag%2Ftypescript-to-json-schema/lists"}