cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

Wrong responseType if response in schema has multiple params #157

Closed fnnzzz closed 3 years ago

fnnzzz commented 3 years ago

Faced a problem that the wrong type is generated for the request builder (text instead json), when schema has multiple params separated with ;.

I found the reason, the method inferResponseType checks for the end of the line, what falls under our case. https://github.com/cyclosproject/ng-openapi-gen/blob/c42cc33e8a316bfcefe4d20a02102dc65f2d08ed/lib/operation-variant.ts#L51-L59

image

As a temporary solution I use customizedResponseType, but there is a problem with the fact that you need to support all new pathes.

Thank you.

luisfpg commented 3 years ago

This is a duplicate of #154. Will be released soon.