swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

TypeScript API generator via Swagger scheme

Results 247 swagger-typescript-api issues
Sort by recently updated
recently updated
newest added

## Issue When setting `generateUnionEnums` to true, the mapping `Key` generics should be set explicitly as strings rather than using the enum mapping. Found on version `13.0.3` ### Setup That...

### Changes New option `--extract-nested-objects` which parse interfaces recursivly. Related to https://github.com/acacode/swagger-typescript-api/issues/639 ### Fixes - add `extractResponses` to `index.d.ts` (for some reason, it wasn't there before)

Hi there, With the following command: `npx swagger-typescript-api -p --responses --modular --axios --unwrap-response-data --route-types --output ./src/api/types/ --name api-types.ts` The following correct files are generated: ![image](https://github.com/acacode/swagger-typescript-api/assets/15127381/4d415a6a-9a3c-462d-8191-5e16acc87805) However, inside `ConsultRequests.ts` the types...

Can I make (maybe using --custom or --templates) with this generator types BigInt for and only for ``` type: integer format: int64 ``` ? For example i have structure ```...

# Context I understand I can use this ``` primitiveTypeConstructs: (struct) => ({ string: { date: 'Date', }, }) ``` To make sure Schema date is mapped to js Date....

OpenAPI has a `writeOnly` property now https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#user-content-schemaWriteOnly `writeOnly` marked fields should not show up in data contracts

For example if the param was i_key the current regex would not find it as a variable. it was only working for the params with more than one letter before...

bug

Hi, here's an example schema: Example schema ```yaml openapi: 3.0.1 info: title: Example API version: v1 paths: /pet: post: summary: Create pet requestBody: content: application/json: schema: type: object required: -...

this is one of our endpoints with a body that may accept two fields: ```ts /** * No description * * @tags Custodians * @name PostSecuredCustodiansCreate * @request POST:/v1/secured/custodians/create */...

FWIW, I'm using this Swagger spec to generate an API: https://esi.evetech.net/latest/swagger.json I then use the following command to generate the API: ``` swagger-typescript-api \ -p https://esi.evetech.net/latest/swagger.json \ -o src/app/api/esi \...