-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
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.
Example:
definitions:
Object:
allOf:
- $ref: '#/definitions/SomeOtherObject'
- type: object
discriminator: object_type0
required:
- object_type0
properties:
object_type0:
type: string
name:
type: string
- type: object
discriminator: object_type1
required:
- object_type1
properties:
object_type1:
type: string
name:
type: string
Is Object supposed to contain all the properties from both inline objects? And if so, how are the discriminator fields handled?
Metadata
Metadata
Assignees
Labels
No labels