{"id":18575453,"url":"https://github.com/braze-community/json-schema-it","last_synced_at":"2025-11-21T00:06:36.465Z","repository":{"id":189043152,"uuid":"679959631","full_name":"braze-community/json-schema-it","owner":"braze-community","description":"📝 JSON Schema generator.","archived":false,"fork":false,"pushed_at":"2024-10-29T19:31:13.000Z","size":2152,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-29T21:36:43.404Z","etag":null,"topics":["json","json-schema","json-schema-generator","npm","schema","typescript"],"latest_commit_sha":null,"homepage":"https://braze-community.github.io/json-schema-it/","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/braze-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T02:44:29.000Z","updated_at":"2024-10-29T19:30:17.000Z","dependencies_parsed_at":"2023-10-14T19:39:35.689Z","dependency_job_id":"ce853403-c25d-4ef5-a9ec-c75bfe86c4c9","html_url":"https://github.com/braze-community/json-schema-it","commit_stats":null,"previous_names":["braze-community/json-schema-it"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fjson-schema-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fjson-schema-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fjson-schema-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braze-community%2Fjson-schema-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braze-community","download_url":"https://codeload.github.com/braze-community/json-schema-it/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248185234,"owners_count":21061477,"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":["json","json-schema","json-schema-generator","npm","schema","typescript"],"created_at":"2024-11-06T23:19:50.935Z","updated_at":"2025-11-21T00:06:36.432Z","avatar_url":"https://github.com/braze-community.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-schema-it\n\n[![NPM](https://nodei.co/npm/json-schema-it.png)](https://nodei.co/npm/json-schema-it/)\n\n[![NPM version](https://img.shields.io/npm/v/json-schema-it.svg)](https://www.npmjs.com/package/json-schema-it)\n[![build](https://github.com/braze-community/json-schema-it/actions/workflows/build.yml/badge.svg)](https://github.com/braze-community/json-schema-it/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/braze-community/json-schema-it/graph/badge.svg?token=XRoK3dG4YV)](https://codecov.io/gh/braze-community/json-schema-it)\n\n[JSON Schema](https://json-schema.org/) generator.\n\n## Quick Start\n\n```ts\nimport { generateSchema } from 'json-schema-it';\n\ngenerateSchema(42); // { type: 'integer' }\n```\n\n## Installation\n\n[NPM](https://www.npmjs.com/package/json-schema-it):\n\n```sh\nnpm install json-schema-it\n```\n\n[Yarn](https://yarnpkg.com/package/json-schema-it):\n\n```sh\nyarn add json-schema-it\n```\n\n## Usage\n\nES Modules:\n\n```ts\nimport { generateSchema } from 'json-schema-it';\n```\n\nCommonJS:\n\n```ts\nconst { generateSchema } = require('json-schema-it');\n```\n\nGenerate JSON Schema:\n\n```ts\ngenerateSchema({\n  productId: 1,\n  productName: 'A green door',\n  price: 12.5,\n  tags: ['home', 'green'],\n});\n```\n\nOutput:\n\n```ts\n{\n  type: 'object',\n  properties: {\n    productId: { type: 'integer' },\n    productName: { type: 'string' },\n    price: { type: 'number' },\n    tags: { type: 'array', items: { type: 'string' } },\n  },\n}\n```\n\nAn error will be thrown for an invalid JSON value:\n\n```ts\ngenerateSchema(undefined); // Uncaught TypeError: Invalid JSON value: undefined\n```\n\n## Release\n\nRelease is automated with [Release Please](https://github.com/googleapis/release-please).\n\n## License\n\n[MIT](https://github.com/braze-community/json-schema-it/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraze-community%2Fjson-schema-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraze-community%2Fjson-schema-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraze-community%2Fjson-schema-it/lists"}