{"id":16748758,"url":"https://github.com/loyd/flow2schema","last_synced_at":"2025-03-23T15:31:08.550Z","repository":{"id":57238816,"uuid":"108689937","full_name":"loyd/flow2schema","owner":"loyd","description":"Generate json-schemas for flowtype definitions","archived":false,"fork":false,"pushed_at":"2019-10-24T17:26:10.000Z","size":203,"stargazers_count":20,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T21:52:02.620Z","etag":null,"topics":["avro","avsc","flow","flowtype","json-schema"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/loyd.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-10-28T22:53:32.000Z","updated_at":"2022-09-04T10:44:08.000Z","dependencies_parsed_at":"2022-09-05T08:21:34.154Z","dependency_job_id":null,"html_url":"https://github.com/loyd/flow2schema","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loyd%2Fflow2schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loyd%2Fflow2schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loyd%2Fflow2schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loyd%2Fflow2schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loyd","download_url":"https://codeload.github.com/loyd/flow2schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245122736,"owners_count":20564364,"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":["avro","avsc","flow","flowtype","json-schema"],"created_at":"2024-10-13T02:22:47.131Z","updated_at":"2025-03-23T15:31:08.157Z","avatar_url":"https://github.com/loyd.png","language":"JavaScript","readme":"# flow2schema\n\n[![Version npm](https://img.shields.io/npm/v/flow2schema.svg)](https://www.npmjs.com/package/flow2schema)\n[![Linux Build](https://travis-ci.org/loyd/flow2schema.svg?branch=master)](https://travis-ci.org/loyd/flow2schema)\n[![Windows Build](https://ci.appveyor.com/api/projects/status/github/loyd/flow2schema?branch=master\u0026svg=true)](https://ci.appveyor.com/project/loyd/flow2schema)\n[![Coverage Status](https://coveralls.io/repos/github/loyd/flow2schema/badge.svg?branch=master)](https://coveralls.io/r/loyd/flow2schema?branch=master)\n\n## Example\n\n```sh\n$ cat example.js\n```\n```js\ntype A\u003cT, K\u003e = {\n    t: T,\n    k: K,\n};\n\nexport type X = {\n    a: A\u003cstring, boolean\u003e,\n    b: number,\n};\n```\n\n```sh\n$ flow2schema -t json-schema example.js\n```\n\n```json\n{\n    \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n    \"definitions\": {\n        \"example::A::string::boolean\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"t\": {\"type\": \"string\"},\n                \"k\": {\"type\": \"boolean\"}\n            },\n            \"required\": [\"t\", \"k\"]\n        },\n        \"example::X\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"a\": {\"$ref\": \"#/definitions/example::A::string::boolean\"},\n                \"b\": {\"type\": \"number\"}\n            },\n            \"required\": [\"a\", \"b\"]\n        }\n    }\n}\n```\n\n## TODO\n* Complete generics support.\n* Errors and warnings.\n* Complete commonjs support.\n* Documentation.\n* Stabilize API.\n* Webpack plugin.\n* Rollup plugin.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floyd%2Fflow2schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floyd%2Fflow2schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floyd%2Fflow2schema/lists"}