swagger-parser
swagger-parser copied to clipboard
Not possible to have "allOf" definitions merged?
Is it not possible to destructure "allOf" array? I want the object definitions in the array be merged into a single "properties" object.
This feature was considered previously, but I decided not to implement it because it wouldn't comply with the spec. See https://github.com/BigstickCarpet/json-schema-ref-parser/issues/1#issuecomment-145652500
It may not comply with the spec, but I have a bunch of dependencies that are failing because they have no idea how to handle "allOf". I figured it would be easiest if I could just merge them using swagger-parser. Wouldn't it be possible even to add an experimental feature for the purpose?
I'm going to re-open this issue to serve as a feature request. I'm currently working on a new version of Swagger Parser that will allow third-party plug-ins that add functionality exactly like this. I'll probably go ahead and create a plugin that does this, since multiple people have asked for it, and it'll be a good demonstration of how to author plug-ins.
@BigstickCarpet Just wondering if you've made any progress on implementing the third-party plugin system for the new Swagger parser, and the plugin for allowing the merge of AllOf definitions?
We're very keen to use this once it's available.
@jcdarwin - I haven't had a chance to work on it yet. A few other projects have needed my time instead. But soon! :)
Stumbled upon this also on BigstickCarpet/swagger-express-middleware#102
@jcdarwin - I haven't had a chance to work on it yet. A few other projects have needed my time instead. But soon! :)
Is that still under consideration?
@sepiol, our next priority is adding support for OpenAPI v3.
@jcdarwin - I haven't had a chance to work on it yet. A few other projects have needed my time instead. But soon! :)
any updates on this?
Gotta respect the spec. If tools don't know what allOf is they need to be updated.
Gotta respect the spec. If tools don't know what allOf is they need to be updated.
Why did you close the issue then? Is this library going to be updated with regards to allOf?
It's not going to be built.