{"repo":"jasonblanchard/openapi-typescript-server","free":true,"listed":false,"github":"https://github.com/jasonblanchard/openapi-typescript-server","clone":"git clone https://github.com/jasonblanchard/openapi-typescript-server.git","description":"Codegen TypeScript servers from OpenAPI","language":"TypeScript","stars":27,"topics":["codegen","openapi","openapi3","openapi3-1","swagger","typescript","api","app","expressjs","openapi-generator"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"openapi-typescript-server openapi-typescript-server is a CLI and minimal runtime library that helps you implement type-safe APIs documented by OpenAPI. Key Features - ✅ Codegen server implementations from OpenAPI 3.0 and 3.1 - ✅ Framework-agnostic core with Express adapter available - ✅ Minimal runtime footprint - ✅ Built on top of openapi-typescript Overview This library works by generating a TypeScript server interface based on your OpenAPI spec using types from openapi-typescript. You provide a concrete implementation that satisfies the interface for each path operation. At runtime, your implementation is converted into HTTP handlers for various frameworks like Express. Stability ⚠️ This package is in very early development. Breaking changes may be introduced as the design and implementation takes shape towards a stable release. For now, proceed with caution! ⚠️ Usage Installation Install build-time packages as dev dependencies: Install runtime adapter (Express example): Recommended : Install middleware for runtime validation: Quickstart Given an OpenAPI spec like this: openapi.yaml First, follow recommended setup from openapi-typescript. Generate types from your OpenAPI spec: Generate the server interface: Note : The --types path is relative to the output directory so the generated code can import it correctly. Implement your API handlers: api.ts Set up your Express server: app.ts Run this server and test your API: Response: See examples/docs for a fully working example. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jasonblanchard","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jasonblanchard/openapi-typescript-server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}