{"id":17149734,"url":"https://github.com/morellodev/openapi-demo","last_synced_at":"2025-03-24T11:43:14.472Z","repository":{"id":201000873,"uuid":"701760243","full_name":"morellodev/openapi-demo","owner":"morellodev","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-25T06:39:26.000Z","size":462,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T17:11:24.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/morellodev.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,"governance":null}},"created_at":"2023-10-07T13:28:22.000Z","updated_at":"2023-10-18T12:56:51.000Z","dependencies_parsed_at":"2023-10-25T07:30:26.021Z","dependency_job_id":null,"html_url":"https://github.com/morellodev/openapi-demo","commit_stats":null,"previous_names":["morellodev/openapi-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morellodev%2Fopenapi-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morellodev%2Fopenapi-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morellodev%2Fopenapi-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morellodev%2Fopenapi-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morellodev","download_url":"https://codeload.github.com/morellodev/openapi-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245266830,"owners_count":20587452,"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":[],"created_at":"2024-10-14T21:33:55.334Z","updated_at":"2025-03-24T11:43:14.452Z","avatar_url":"https://github.com/morellodev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPI Demo\n\nThis is a little demo to show how to share an OpenAPI schema between client and server in a web app.\n\nThe server exposes a REST API with CRUD operations on the `Todo` resource, and the client consumes the auto-generated functions from the same schema used by the server.\n\n## Pre-requisites\n\nYou will need `node@20` and `pnpm` installed. Refer to the [pnpm docs](https://pnpm.io/installation) for installation instructions.\n\n## Getting started\n\n1. Clone the repo\n2. Run `pnpm install` to install dependencies\n3. Run `pnpm dev` to start the server and client\n\n## Mocking\n\nThe `@app/mocks` package contains mocked resources and API interceptors for the client and tests, powered by [msw](https://mswjs.io).\n\nTo enable mocking in development, uncomment the following lines in [@app/client/src/main.tsx](./packages/client/src/main.tsx):\n\n```ts\nif (import.meta.env.DEV) {\n  const { worker } = await import(\"@app/mocks/browser\");\n  await worker.start();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorellodev%2Fopenapi-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorellodev%2Fopenapi-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorellodev%2Fopenapi-demo/lists"}