Webapi-Swagger : Ensure generation of (Referenced) Response types correctly
As per the Swagger 2.0 spec, Responses (Reusing Responses sub-section)
can be defined as Inline (already currently handled) or Referenced.
If Referenced, they can be referencing either defined types in Definitions or (Global) Responses section.
We need to make sure the latter is also handled properly and that if any response headers are defined , their types are generated and the Contract reflects the same.
The code to be implemented for this ticket to be closed would be :
A : Read the global Response section and generate types in the Types.GlobalDefinitions.ResponseDefinitions module.
B : When any response (in a path/operation) is a referenced response, we need to check if it's in the global Response or Definition list and accordingly set the level info so that the type generated in the Contract has the correct qualification.