You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been studying the open api spec and swagger-codegen projects for the constraints on allOf:
It appears that swagger-codegen (language is java) only recognizes the last inline element of an allOf: array. I have not found a statement in this spec or code in swagger-codegen that specifies this constraint.
So, I'm asking... Can the allOf: array be multiple inline elements? If I create a spec that has more than 1 inline element, it appears that only the last one is recognized.
FYI: This came up in trying to define a discriminator for the inline object.
allOf is an array of Schema Objects, whether referenced or defined inline. allOf itself can be used inline wherever the Schema Object is used, regardless of its location.
The spec doesn't take into account the use case you provided here, and it's up to the tooling to decide whether to support it or not. I would expect them not to, mostly because I don't see the use for it.
Activity
webron commentedon Nov 21, 2016
allOfis an array of Schema Objects, whether referenced or defined inline.allOfitself can be used inline wherever the Schema Object is used, regardless of its location.The spec doesn't take into account the use case you provided here, and it's up to the tooling to decide whether to support it or not. I would expect them not to, mostly because I don't see the use for it.
handrews commentedon Feb 24, 2020
More than three years since answer with no further comments. I'm guessing this is safe to close ;P