Closed Kosta-Github closed 5 years ago
@Kosta-Github - Seems you you closed this - intentional?
yes, the PR didn't fix all potential combinations I am seeing in the variant swagger specs I am dealing... I will try to come up with a new proposal...
Sounds good!
this is the follow-up PR: https://github.com/mtennoe/swagger-typescript-codegen/pull/87
The swagger spec allows to define an optional root level
responses
object which allows to reuseresponse
definitions for several endpoints; see: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#fixed-fieldsThis PR adds support for this potential additional level of indirection.
Check the added endpoint def for
/Admin/{id}
intests/apis/test.json
. It contains this reference to a sharedresponse
definition:which is pointing to this
response
definition on the root level: