{"id":26765845,"url":"https://github.com/emptyless/jsonschema-transform","last_synced_at":"2026-05-01T02:31:25.359Z","repository":{"id":277157288,"uuid":"930865652","full_name":"Emptyless/jsonschema-transform","owner":"Emptyless","description":"jsonschema-transform is a CLI utility that can transform JSON Schema into D2. This can be useful to visualize a large set of JSON Schema's that are interconnected (and possibly have remote references)","archived":false,"fork":false,"pushed_at":"2025-03-27T07:55:09.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T08:39:15.080Z","etag":null,"topics":["d2","jsonschema"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Emptyless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-02-11T10:41:23.000Z","updated_at":"2025-03-05T12:13:22.000Z","dependencies_parsed_at":"2025-02-12T13:25:52.575Z","dependency_job_id":"f15f872d-bfbb-41d5-83d2-a293be199a0e","html_url":"https://github.com/Emptyless/jsonschema-transform","commit_stats":null,"previous_names":["emptyless/jsonschema-transform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fjsonschema-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fjsonschema-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fjsonschema-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fjsonschema-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emptyless","download_url":"https://codeload.github.com/Emptyless/jsonschema-transform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093178,"owners_count":20722403,"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":["d2","jsonschema"],"created_at":"2025-03-28T20:17:36.588Z","updated_at":"2026-05-01T02:31:25.328Z","avatar_url":"https://github.com/Emptyless.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON-Schema Transform\n\n_This CLI tool is under active development and must be considered alpha. It's API may be changed in a breaking way until a 1.0 version is released. Submit issues to the Github issue tracker if found._\n\n`jsonschema-transform` is a CLI utility that can transform [JSON Schema](https://json-schema.org) into [D2](https://d2lang.com). This can be useful to visualize a large set of JSON Schema's that are interconnected (and possibly have remote references).\n\n### Quickstart\n\nWith default arguments, running `jsonschema-transform d2` to create the `d2` representation of the `testdata` directory: \n\n```\n$ jsonschema-transform d2 --globs ./testdata/*.json\n```\n\nA new output file named `diagram.d2` is created in the current working directory. To create an SVG, change the output to a SVG filetype:\n\n```\n$ jsonschema-transform d2 --globs ./testdata/*.json --output diagram.svg\n```\n\n\u003cimg src=\"./diagram.svg\" width=500 height=500\u003e\n\n### Installation\n\n```\ngo install github.com/Emptyless/jsonschema-transform\n```\n\nAlso make sure that `d2` is installed:\n\n```\nbrew install d2\n```\n\n### Usage\n\n- `--globs`: to match containing JSON Schema documents, e.g. `*/*.json` or `./testdata/pet.json`\n- `--base-uri`: to use for fetching relative $refs, including `file://` based $refs\n- `--overwrite`: allow overwrite of output file if the file exists already\n- `--output`: name of the output file (extension must be either 'svg' or 'd2')\n- `-v` (or `-vv`, `-vvv`): sets the verbosity\n- `-q`: quiet (opposite of verbosity)\n\n### TODO's\n\n- [x] get basic structure of CLI working\n- [ ] test against more complex JSON Schema's\n- [ ] generate markdown (MD) files from the JSON schemas with clickable links\n\n### Mentions\n\n- [kaptinlin/jsonschema](github.com/kaptinlin/jsonschema): a Go JSON Schema library\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fjsonschema-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femptyless%2Fjsonschema-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fjsonschema-transform/lists"}