openapi-typescript
openapi-typescript copied to clipboard
Generate TypeScript types from OpenAPI 3 specs
## Changes Noticed that when a request body field had a `default` value, that it was being specified as required. This would change it to be treated like a parameter...
## Changes Document new default as mentioned in the [migration guide](https://github.com/drwpow/openapi-typescript/blob/main/docs/migration-guide.md#defaultnonnullable-true-by-default) ## How to Review Verify against actual default value ## Checklist - [ ] Unit tests updated - [x]...
**Description** _A brief description of the bug._ issue on - generate client when yaml has mutiple same external ref ``` Paste full error message ``` | Name | Version |...
**Description** Processing the [OpenAPI spec of the Mongo Atlas Admin API](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/) I found that the `oneOf` construct yields to types that have a cyclic reference that result in TypeScript error...
**Description** In an OpenAPI spec we have some type that are annotated with a specific format: ```yml properties: id: type: string format: uuid description: a unique identifier ``` You can...
Hello everyone :) **Description** When using --array-length flag and minItems, maxItems with identical values in schema definition, the generated interface is []. | Name | Version | | :------------------- |...
**Description** types are not enforced with typescript `5.5.3` **Reproduction** `src/repro.ts` ```ts import createClient from 'openapi-fetch'; import type { paths } from 'petstore'; // generated via npx openapi-typescript https://petstore3.swagger.io/api/v3/openapi.yaml -o src/petstore.d.ts...
## Changes Fixed the opencollective link in the README file. ## How to Review Review the updated link in the README file to ensure it points to the correct location....
The following snippet of code should be valid, as per the README: ``` import createClient from "openapi-fetch"; import type { paths } from "./petstore"; // npx openapi-typescript https://petstore3.swagger.io/api/v3/openapi.yaml -o petstore.d.ts...
## Changes This Pull-request brings a new package `openapi-tanstack-query` that combines the power of `openapi-fetch` and `@tanstack/react-query` together. Here is a simple example: ```tsx import createClient from 'openapi-fetch'; import createQueryClient...