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

SortTypes issue

Open NikYushchenko opened this issue 2 years ago • 1 comments

Hello. I caught one issue with the sort function.

image

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) image

https://github.com/acacode/swagger-typescript-api/pull/299

NikYushchenko avatar May 30 '22 10:05 NikYushchenko

Perhaps bring this up here: https://github.com/acacode/swagger-typescript-api/issues/360

andersfylling avatar Jun 01 '22 09:06 andersfylling

Was fixed in 10.0.2

NikYushchenko avatar Oct 27 '22 12:10 NikYushchenko

Thanks

NikYushchenko avatar Oct 27 '22 12:10 NikYushchenko