{"id":23300238,"url":"https://github.com/connorjs/swapi-typespec","last_synced_at":"2026-05-02T06:40:02.009Z","repository":{"id":193608373,"uuid":"689152742","full_name":"connorjs/swapi-typespec","owner":"connorjs","description":"TypeSpec representation of SWAPI: The Star Wars API.","archived":false,"fork":false,"pushed_at":"2025-04-15T20:44:49.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T23:38:27.293Z","etag":null,"topics":["api","openapi","openapi3","starwars","swagger","swapi","typespec"],"latest_commit_sha":null,"homepage":"","language":"TypeSpec","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/connorjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-09-09T00:02:29.000Z","updated_at":"2025-04-15T20:44:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dab0df4-0c0e-42c8-9b0c-16504aed7071","html_url":"https://github.com/connorjs/swapi-typespec","commit_stats":null,"previous_names":["connorjs/swapi-typespec"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/connorjs/swapi-typespec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorjs%2Fswapi-typespec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorjs%2Fswapi-typespec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorjs%2Fswapi-typespec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorjs%2Fswapi-typespec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connorjs","download_url":"https://codeload.github.com/connorjs/swapi-typespec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorjs%2Fswapi-typespec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32525896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","openapi","openapi3","starwars","swagger","swapi","typespec"],"created_at":"2024-12-20T09:11:03.016Z","updated_at":"2026-05-02T06:40:02.005Z","avatar_url":"https://github.com/connorjs.png","language":"TypeSpec","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWAPI TypeSpec\n\n[TypeSpec][typespec] representation of SWAPI: The Star Wars API.\n\n🎉 Shout out to [swapi.info][swapi] for hosting a stable version of the API. 🎉\n\n[swapi]: https://swapi.info\n[typespec]: https://microsoft.github.io/typespec/\n\n\u003c!-- Badges: Use link shorthand for readability and easier reordering --\u003e\n\n[![CI Build][ci-build-badge]][ci-build]\n[![npm version][npm-version-badge]][npm-version]\n\n[ci-build]: https://github.com/connorjs/swapi-typespec/actions/workflows/ci-build.yml\n[ci-build-badge]: https://github.com/connorjs/swapi-typespec/actions/workflows/ci-build.yml/badge.svg\n[npm-version]: https://www.npmjs.com/package/swapi-typespec\n[npm-version-badge]: https://img.shields.io/npm/v/swapi-typespec\n\n\u003c!-- End badges --\u003e\n\n## About\n\nI created this project to learn about TypeSpec through first-hand usage.\n\nThe generated Open API 3 specification has 878 lines (with no blank lines) in a single file.\nThe TypeSpec source has 493 lines (about ⅓ are blank lines for readability) split across 8 files for logical organization.\nThis is a ~45% reduction in lines of code.\n\nIf we ignore the imports, using statements, and blank lines within models, then the TypeSpec only has 353 lines.\nThat means a 60% reduction in code to maintain.\n\n## Installation\n\nFollow these steps to consume the generated Open API specification for SWAPI.\n\n1. Install this package as a dependency.\n\n   ```sh\n   npm install -D swapi-typespec\n   ```\n\n2. Reference the generated Open API specification directly.\n\n   ```sh\n   ./node_modules/swapi-typespec/swapi.openapi.yaml\n   ```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorjs%2Fswapi-typespec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorjs%2Fswapi-typespec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorjs%2Fswapi-typespec/lists"}