openapi-typescript
openapi-typescript copied to clipboard
Generate TypeScript types from OpenAPI 3 specs
**Description** Generate a separate interface for each `components.schemas` model to provide a better development experience and easier models consumption. **Proposal** I've created a diff [PR](https://github.com/drwpow/openapi-typescript/pull/1413/files?diff=split&w=1) with the proposed changes, showing...
What's the recommended way to perform runtime validation in this library? To ensure that as APIs change or worse diverge from the spec they produce we get either warning or...
Array of response object in schema.yaml / schema.json does not result in array type in schema.d.ts
**Description** Array type of response object does not result in array type in schema ``` "SomeResponseObject" : { "type" : "object", "properties" : { "page" : { "format" : "int64",...
https://github.com/drwpow/openapi-typescript/blob/206f28517f1707ec0d97ad72251323a0da6ad2f1/src/types.ts#L436  type: 'string' should allow `pattern?: string` as per the standard: https://swagger.io/docs/specification/data-models/data-types/#string otherwise it falsely assumes it is supposed to be type 'object' and gives an error that way....
**Description** The most popular (and de-facto standard) .NET Core OpenAPI [NSwag package](https://github.com/RicoSuter/NSwag) uses the following: * `x-enumNames` for `x-enum-varnames` * `x-enumDescriptions` for ` x-enum-descriptions` **Proposal** Adapting the code can be...
**Description** The mock setup example given in the documentation pages does not infer the parameter type for `mockResponses` correctly when two different status codes in the schema return different content...
**Description** Our particular use case is a `user` spec and a superset `admin` spec, that at various points refers to models within the `user` spec. Many operation IDs are replicated...
**Description** I'd really like to be able to support relative file refs. The spec appears to allow them and absolute file paths are impractical for my use case. **Proposal** I...
Looks like https://github.com/drwpow/openapi-typescript/pull/1280 might fix this when merged. **Description** With the update to `0.7.1` from `0.6.0`, errors began to throw with `SyntaxError: Unexpected end of JSON input` when a record...
I have the spec: ``` /companies/{company_id}: get: summary: Show company tags: - Company security: - oat: [] parameters: - in: path name: company_id schema: type: string required: true ... ```...