Closed
Description
This is possibly not a bug, but it is not working the way I would expect.
I am trying to implement multi-level inheritance as shown below.
What happens in this case, my Custom item extends the NormalItem. But when we try to generate it fails because CustomItem has a constructor that starts with the first field of the NormalItem. It appears that in this case nothing from BaseItem is pulled into CustomItem, it only inherits from NormalItem.
BaseItem:
x-parent: true
description: "Base Item"
required:
- object1
- item2
type: object
properties:
object1:
type: object
allOf:
- $ref: "#/components/schemas/Object1"
item2:
type: string
example: BBB
NormalItem:
x-parent: true
allOf:
- $ref: '#/components/schemas/BaseItem'
- type: object
required:
- normal1
required:
- normal1
type: object
properties:
custom1:
type: string
example: XXX
CustomItem:
x-parent: true
allOf:
- $ref: '#/components/schemas/NormalItem'
- type: object
required:
- custom1
required:
- custom1
type: object
properties:
custom1:
type: string
example: 1111
Object1:
type: object
properties:
field1:
type: string
field2:
type: number