swagger-typescript-api
swagger-typescript-api copied to clipboard
SortTypes issue
Hello. I caught one issue with the sort function.
content: schema.rawTypeData['$parsed'].content.sort(sortByName)}
After some research I've found that in openapi we have this
"TriggerAPISchema": "title":"TriggerAPISchema","type":"object","properties":{}}
which in the code has content: 'object'
, where sort
is undefined.
I think it would be good to add validation Array.isArray(schema.rawTypeData['$parsed'].content)
https://github.com/acacode/swagger-typescript-api/pull/299
Perhaps bring this up here: https://github.com/acacode/swagger-typescript-api/issues/360
Was fixed in 10.0.2
Thanks