Closed manwithsteelnerves closed 6 years ago
Same issue here, but with json files. Would be grateful if someone could help us
It is true that the definitions are not merged into the combined schema, however they are actually not needed because JSON Schema $Ref Parser's dereference
function resolves all references and inlines them into the combined schema. Of course this is not ideal and there is already a feature request (#20) to use the bundle
function instead, which would allow the usage of internal references.
Can you give me an example why you would need the definitions in a dereferenced schema as well?
I would like to use the combined output of the individual files to visualize them using the swagger-ui. If the definitions/modell -part is missing the swagger-ui will not show the "Models" section which is quite usefull. Also some other HTML and Doc generators rely on this section of the defintion file
OK, that makes sense to me. We'll introduce an option to include the definitions in the combined schema.
@fabsrc I think you have missed few key things in your implementation:
I tired merging multiple yaml files and final output doesn't have the definitions/models. Is this expected behaviour?