{"id":21667703,"url":"https://github.com/alan2207/rest-to-ts","last_synced_at":"2025-07-18T12:33:05.174Z","repository":{"id":264060395,"uuid":"891713712","full_name":"alan2207/rest-to-ts","owner":"alan2207","description":"A proof of concept of generating TypeScript types from REST API endpoints.","archived":false,"fork":false,"pushed_at":"2024-11-25T20:46:40.000Z","size":284,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T23:11:10.587Z","etag":null,"topics":["rest-api","typescript"],"latest_commit_sha":null,"homepage":"","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/alan2207.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":"2024-11-20T20:29:26.000Z","updated_at":"2025-01-23T00:08:11.000Z","dependencies_parsed_at":"2024-11-21T19:36:08.110Z","dependency_job_id":"5760890d-d7f7-4426-aba5-1c8fca38b50c","html_url":"https://github.com/alan2207/rest-to-ts","commit_stats":null,"previous_names":["alan2207/rest-to-ts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alan2207/rest-to-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Frest-to-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Frest-to-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Frest-to-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Frest-to-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alan2207","download_url":"https://codeload.github.com/alan2207/rest-to-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan2207%2Frest-to-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265760723,"owners_count":23824082,"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":["rest-api","typescript"],"created_at":"2024-11-25T11:46:19.305Z","updated_at":"2025-07-18T12:33:05.120Z","avatar_url":"https://github.com/alan2207.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST to TS\n\nA proof of concept of generating TypeScript types from REST API endpoints.\n\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"./_docs/hero.png\" alt=\"REST to TS\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n## Why?\n\nSometimes you have a REST API that doesn't have OpenAPI spec or it is difficult to get one, but you still want to generate types for it. This is a quick way to do it.\n\n## How it works?\n\n![REST to TS diagram](./_docs/diagram.png)\n\n1. A configuration is provided with the endpoints you want to generate types for.\n2. API calls are made to each endpoint with the provided variations.\n3. The responses are extracted and used to generate the types with the help of [quicktype](https://github.com/glideapps/quicktype).\n\n## Usage:\n\n```bash\n# Install dependencies\nnpm install\n\n# Start the API\nnpm run start-api\n\n# Generate the types\nnpm run generate-types\n```\n\n## Configuration\n\nConfiguration is defined in the `src/config.ts` file.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan2207%2Frest-to-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan2207%2Frest-to-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan2207%2Frest-to-ts/lists"}