Open programmer106 opened 1 year ago
Hi, did you get a solution for this issue?
Thanks
Hi,
did you get a solution for this issue?
Thanks
Eh, no. Got fired.
The same issue occured in the Angular TypeScript client https://github.com/swagger-api/swagger-codegen/issues/6201. It has already been fixed in https://github.com/swagger-api/swagger-codegen/pull/6450. Maybe a similar change for the axios client would fix the issue?
It is quiet hacky but you can simply duplicate your DTO:
components:
schemas:
Category:
x-swagger-router-model: io.swagger.petstore.model.Category
properties:
id:
type: string
name:
type: string
example: Dogs
subcategories:
type: array,
items:
$ref: '#/components/schemas/CategoryRecurstion'
xml:
name: category
type: object
CategoryRecurstion:
x-swagger-router-model: io.swagger.petstore.model.CategoryRecurstion
properties:
id:
type: string
name:
type: string
example: Dogs
subcategories:
type: array,
items:
$ref: '#/components/schemas/Category'
xml:
name: categoryRecursion
type: object
given:
after generation:
after trying to build got:
Can't maintain the client-ts layer effectively due to this issue.