{"id":29215541,"url":"https://github.com/cyansalt/transchema","last_synced_at":"2026-03-06T13:04:28.096Z","repository":{"id":296125904,"uuid":"992372581","full_name":"CyanSalt/transchema","owner":"CyanSalt","description":"Transform JSON Schema definition into inline TypeScript type","archived":false,"fork":false,"pushed_at":"2025-11-28T02:33:01.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T14:55:47.274Z","etag":null,"topics":["json-schema","typescript"],"latest_commit_sha":null,"homepage":"","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/CyanSalt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-29T03:48:53.000Z","updated_at":"2025-11-28T02:33:04.000Z","dependencies_parsed_at":"2025-05-29T04:29:20.197Z","dependency_job_id":"68edd843-3b03-44ea-a587-227e9b8b9ad3","html_url":"https://github.com/CyanSalt/transchema","commit_stats":null,"previous_names":["cyansalt/transchema"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/CyanSalt/transchema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Ftranschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Ftranschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Ftranschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Ftranschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyanSalt","download_url":"https://codeload.github.com/CyanSalt/transchema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Ftranschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30178286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T12:39:21.703Z","status":"ssl_error","status_checked_at":"2026-03-06T12:36:09.819Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["json-schema","typescript"],"created_at":"2025-07-03T00:33:07.088Z","updated_at":"2026-03-06T13:04:28.068Z","avatar_url":"https://github.com/CyanSalt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transchema\n\n[![npm](https://img.shields.io/npm/v/transchema.svg)](https://www.npmjs.com/package/transchema)\n\nTransform JSON Schema definition into inline TypeScript type.\n\n## Usage\n\n```ts\nimport { transform } from 'transchema'\n\ntransform({\n  type: 'array',\n  prefixItems: [\n    { type: 'number' },\n    { type: 'string' },\n    { enum: ['Street', 'Avenue', 'Boulevard'] },\n    { enum: ['NW', 'NE', 'SW', 'SE'] },\n  ],\n  items: { type: 'string' },\n}) // [number, string, 'Street' | 'Avenue' | 'Boulevard', 'NW' | 'NE' | 'SW' | 'SE', ...string[]]\n```\n\n`transform` supports the following options:\n\n- `additionalProperties`: `additionalProperties` for objects defaults to `true` in the JSON Schema specification, which means that all object types are non-closed. In this case, transchema will add `\u0026 Record\u003cstring, unknown\u003e` union types to these objects to ensure semantic consistency. You can change its default value by setting `additionalProperties: false` to reduce the appearance of this type.\n\n## Why use it?\n\nThe typical scenario is to display type of a JSON Schema in the browser. This is useful for displaying MCP tool parameters.\n\nUnlike other Json-Schema-to-TypeScript tools, it has:\n\n- 0 runtime dependencies, so it's safe to run in the browser.\n- Inline types generation, which will render human-readable types.\n\nAs such, modular combination features such as `$ref` are not supported.\n\n## Other Tools\n\n- If you want to transform JSON Schema to a complete TypeScript declaration file, you can use [`json-schema-to-typescript-lite`](https://github.com/antfu/json-schema-to-typescript-lite).\n- If you use `zod` as the schema describer, [`zod-to-ts`](https://github.com/sachinraja/zod-to-ts) supports generating inline types.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyansalt%2Ftranschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyansalt%2Ftranschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyansalt%2Ftranschema/lists"}