Typed Fetch Client for OpenAPI Schemas
JSON →openapi-typescript-fetch provides a robust and type-safe `fetch` client tailored for use with TypeScript definitions generated by `openapi-typescript`. It simplifies API interactions by offering strong typing for request parameters, response bodies, and error structures, directly derived from OpenAPI 3.x and Swagger 2.0 schemas. The current stable version is 2.2.1, with releases occurring incrementally as bug fixes and minor features are introduced. The project differentiates itself by deeply integrating with `openapi-typescript`'s generated types, allowing developers to configure a global fetcher instance, define per-path operations, and handle complex API error responses using discriminated unions, enhancing developer experience and reducing runtime errors. It supports middleware for request/response interception and offers utility types for introspection of operation arguments and return values. This library focuses on providing a secure and reliable way to interact with RESTful APIs in TypeScript environments, primarily for Node.js (>=12) and modern browsers.
Traffic · last 30 days ↑50% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · LY · 🇩🇪 Germany