openapi-typescript
openapi-typescript copied to clipboard
Generate TypeScript types from OpenAPI 3 specs
**Description** If you use `anyOf` with `required`, the resulting interface has `$expected | unknown | unknown`. Sample file: ``` { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "demo thing", "description":...
**Description** As for now, this tool "translate" the OpenAPI specification and export everything inside a single file. If the YAML/JSON specification is big enough (eg. we have a microservice which...
When generating types for Slack & Discord I'm getting the following issue Slack https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.json  Discord https://raw.githubusercontent.com/discord/discord-api-spec/main/specs/openapi.json I checked neither specs pass the redocly linter....
**Description** I generated types from https://benchling.com/api/v2/openapi.yaml file, and all of the required attributes are shown as optional in typescript. | Name | Version | | :------------------- | :--------------------------- | |...
Similar question: https://github.com/OAI/OpenAPI-Specification/issues/1870 ``` allOf: - $ref: '#/components/schemas/Info' - type: object required: - name - locationUuid ``` This one returns as type `Info & Record` We still can't migrate from...
**Description** When calling APIs it is frequently extremely useful to be able to see its definition in the typing file, what are the params, body, etc. Today navigating from call...
`openapi-typescript https://1.1.1.1/admin/swagger/doc.json --output petstore.ts` output ``` ✨ openapi-typescript 5.1.1 (node:29072) UnhandledPromiseRejectionWarning: Error: unable to verify the first certificate ```
**Description** Not sure if I understand correctly, for me it seems the discriminator should only exist on the parent schema, and not the child, where the discriminator mapping map the...
**Description** For 1-level inheritance types the discriminator property is to a static value that identifies the type. For 2-level inheritance types this is not the case which makes it not...
**Description** Relative referenced yaml files results in a never type. ```ts export interface external { "bar.yaml": Record } ``` | Name | Version | | :------------------- | :--------------------------- | |...