openapi-typescript-codegen
openapi-typescript-codegen copied to clipboard
NodeJS library that generates Typescript or Javascript clients based on the OpenAPI specification
While having a spec like ```json "responses": { "204": { "description": "Success", "headers": { "X-Auth-Token": { "description": "header containing the auth token", "schema": { "type": "string" } } } },...
Currently, the `Resolver` is defined as ```ts type Resolver = (options: ApiRequestOptions) => Promise; ``` and keys like `TOKEN` are defined like: ```ts export type OpenAPIConfig = { TOKEN?: string...
### Problem `openapi.yaml` spec file has relative references to schemas ```yaml openapi: 3.0.0 info: title: Reproduce bug version: '1.0' servers: - url: /api paths: '/mysql': post: summary: 'Create MySQL resource'...
**What is the problem?** I'm using `openapi-typescript-codegen` for creating an `axios` client. When I try to call one of the services I end up getting the following error: ```sh .../_nestjs/node_modules/delayed-stream/lib/delayed_stream.js:33...
I am facing issue with responseType blob. I don't see any workaround to get receive response as Blob. My OpenAPI specification as follows:  and my actual code to download...
https://github.com/ferdikoomen/openapi-typescript-codegen/blob/e2d6be10f0ffd59c9ae5dd9d76ccf2d57acd97aa/src/templates/core/functions/getFormData.hbs#L2 We're using `openapi-typescript-codegen` on a project and one of our `PUT` endpoints has the following `requestBody` spec: ``` "requestBody": { "content": { "multipart/form-data": { "schema": { "required": [ "file"...
## Steps to reproduce 1. Generate an API call that accepts a path parameter. E.g. ```typescript public static getPerson({ id, }: { /** * The ID of the Person to...
When we use a get ```/apples/:id`` and a get all ```/apples/`` the second one listed in the schema will turn into apples1 function in the generated code. isnt the openapi...
**What changed** Adds a `--transformCase` flag that accepts either `snake` or `camel` (defaults to `none`). Will convert model names from snake, camel, or pascal case to whichever option was passed...