Open cfiken opened 4 years ago
Hi @yonaskolb. When I upgrade SwagGen from 4.2.0 to 4.3.1, I noticed that there are big differences in API.{API_NAME}.Response. I made a reproducible repository and sample definition of openapi.yml.
API.{API_NAME}.Response
openapi.yml
In v4.2.0, the type of Response is SampleResponse, which is defined in Models.SampleResponse. https://github.com/cfiken/SwagGenTest/blob/master/generated_4.2.0/Sources/Requests/Sample/GetSomeEndpoint.swift#L53
SampleResponse
Models.SampleResponse
In v4.3.1, however, the type of Response is Status200 which is defined in the same file. Therefore the definition in Models.SampleResponse is not used here. https://github.com/cfiken/SwagGenTest/blob/master/generated/Sources/Requests/Sample/GetSomeEndpoint.swift#L85
Status200
In this case the former v4.2.0 case is the behavior what I expected, but I couldn't figure out if the latter v4.3.1 is a SwagGen bug or a specification by openapi.yml definition.
Is this kind of bug? or just a mistake on my part?
Hi @yonaskolb. When I upgrade SwagGen from 4.2.0 to 4.3.1, I noticed that there are big differences in
API.{API_NAME}.Response
. I made a reproducible repository and sample definition ofopenapi.yml
.In v4.2.0, the type of Response is
SampleResponse
, which is defined inModels.SampleResponse
. https://github.com/cfiken/SwagGenTest/blob/master/generated_4.2.0/Sources/Requests/Sample/GetSomeEndpoint.swift#L53In v4.3.1, however, the type of Response is
Status200
which is defined in the same file. Therefore the definition inModels.SampleResponse
is not used here. https://github.com/cfiken/SwagGenTest/blob/master/generated/Sources/Requests/Sample/GetSomeEndpoint.swift#L85In this case the former v4.2.0 case is the behavior what I expected, but I couldn't figure out if the latter v4.3.1 is a SwagGen bug or a specification by
openapi.yml
definition.Is this kind of bug? or just a mistake on my part?