Support composed definitions
RobWin opened this issue · comments
Currently, if you have a composed definition (using the allOf device), no documentation is generated for that definition other than the header and description. This is because the current definition code does not take into account $refs or composition.
This adds support for both reference models and composed models. The composition logic could likely be improved to provide better documentation for the composition (i.e. - where the definition came from, etc.), but for this improvement just flattens the composed model in the documentation. I see this is a fine compromise given that's how the endpoint will behave, anyway.
Released in v0.7.0
Thx. I have a look at it.
Hello, I remember why its not implemented.
The Respones table and the column Schema
is not suited to render an inner table with all properties of the composed schema. It would blast the view.
A better practice would be to create a new Model definition, e.g. MyComposedRepsonse
, which composes your #/definitions/Response
and your registered
property. In your responses you just reference the model "$ref": "#/definitions/MyComposedResponse
.
I would love to get your GitHub Star, if you like Swagger2Markup.