{"id":23300238,"url":"https://github.com/connorjs/swapi-typespec","last_synced_at":"2025-04-06T21:30:08.526Z","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":"2023-09-11T21:36:11.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T21:16:09.745Z","etag":null,"topics":["api","openapi","openapi3","starwars","swagger","swapi","typespec"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":"2024-04-30T09:04:04.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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247554388,"owners_count":20957600,"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":["api","openapi","openapi3","starwars","swagger","swapi","typespec"],"created_at":"2024-12-20T09:11:03.016Z","updated_at":"2025-04-06T21:30:08.479Z","avatar_url":"https://github.com/connorjs.png","language":"JavaScript","readme":"# SWAPI TypeSpec\n\n[TypeSpec][typespec] representation of [SWAPI: The Star Wars API][swapi].\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\nsingle file. The TypeSpec source has 493 lines (about ⅓ are blank lines for\nreadability) split across 8 files for logical organization, which is a ~45%\nreduction in lines of code.\n\nIf we ignore the imports, using statements, and blank lines within models, then\nthe TypeSpec only has 353 lines. That means a 60% reduction in code to maintain.\n\n## Getting started\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[swapi]: https://swapi.dev\n[typespec]: https://microsoft.github.io/typespec/\n","funding_links":[],"categories":[],"sub_categories":[],"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"}