{"id":21678412,"url":"https://github.com/aaharu/schemarshal","last_synced_at":"2025-04-12T05:36:25.819Z","repository":{"id":70030979,"uuid":"77937194","full_name":"aaharu/schemarshal","owner":"aaharu","description":"Generates Go struct types from a JSON Schema.","archived":false,"fork":false,"pushed_at":"2018-06-04T19:18:00.000Z","size":99,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T01:01:52.815Z","etag":null,"topics":["go","go-generate","json-schema","json-schema-to-go-structs","struct"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaharu.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-03T17:12:53.000Z","updated_at":"2023-09-04T09:51:33.000Z","dependencies_parsed_at":"2023-06-04T22:00:19.568Z","dependency_job_id":null,"html_url":"https://github.com/aaharu/schemarshal","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaharu%2Fschemarshal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaharu%2Fschemarshal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaharu%2Fschemarshal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaharu%2Fschemarshal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaharu","download_url":"https://codeload.github.com/aaharu/schemarshal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248524734,"owners_count":21118613,"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":["go","go-generate","json-schema","json-schema-to-go-structs","struct"],"created_at":"2024-11-25T14:33:28.926Z","updated_at":"2025-04-12T05:36:25.780Z","avatar_url":"https://github.com/aaharu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# schemarshal [![wercker status](https://app.wercker.com/status/ebb1f8ec249177acd0d47bd8a6a59dd2/s/master \"wercker status\")](https://app.wercker.com/project/byKey/ebb1f8ec249177acd0d47bd8a6a59dd2)\n\n[![Coverage Status](https://coveralls.io/repos/github/aaharu/schemarshal/badge.svg)](https://coveralls.io/github/aaharu/schemarshal)\n[![Go Report Card](https://goreportcard.com/badge/github.com/aaharu/schemarshal)](https://goreportcard.com/report/github.com/aaharu/schemarshal)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Faaharu%2Fschemarshal.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Faaharu%2Fschemarshal?ref=badge_shield)\n\nGenerates Go struct types from a [JSON Schema](http://json-schema.org/).\n\n## Installation\n\n```bash\ngo get -u github.com/aaharu/schemarshal\n```\n\n## Usage\n\n```\nSYNOPSIS\n  schemarshal [options] [\u003cjson_schema_file\u003e]\nOPTIONS\n  -h, -help\n           Show this help message.\n  -f \u003cfile\u003e, -file \u003cfile\u003e\n           Input file name.\n  -o \u003cfile\u003e, -output \u003cfile\u003e\n           Write output to file instead of stdout.\n  -p \u003cpackage\u003e, -package \u003cpackage\u003e\n           Package name for output. (default `main`)\n  -t \u003cpackage\u003e, -type \u003cpackage\u003e\n           Set default Type name.\n  -v, -version\n           Show version.\n  -nc, -nocomment\n           Do not output comments.\n```\n\n```bash\n# with args\nschemarshal -o api/schema/gen.go -p gen -f schema.json\n\n# pipe\ncurl -s \"https://raw.githubusercontent.com/aaharu/schemarshal/master/test_data/disk.json\" | schemarshal\n```\n\n## TODO\n\n- [ ] use go/ast\n\n## [Examples](examples.md)\n\n- [example a.json](examples.md#ajson)\n- [example qiita schema](examples.md#qiita-v2-schema)\n\n## Dependencies\n\n* https://github.com/lestrrat/go-jsschema\n  - JSON Schema parser\n  - MIT License\n* golang.org/x/crypto/ssh/terminal\n  - https://godoc.org/golang.org/x/crypto/ssh/terminal\n  - https://golang.org/LICENSE\n\n## Similar Projects\n\n* https://github.com/idubinskiy/schematyper\n* https://github.com/dameleon/structr\n* https://github.com/interagent/schematic\n\n## License\n\nBSD-2-Clause\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Faaharu%2Fschemarshal.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Faaharu%2Fschemarshal?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaharu%2Fschemarshal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaharu%2Fschemarshal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaharu%2Fschemarshal/lists"}