已定义的对象
OneObject:
type: object
properties:
AProperty:
type: string
BProperty:
type: string
另一个对象:
AnotherObject:
type: object
properties:
AProperty:
type: string
BProperty:
type: string
CProperty:
type: string
由于AProperty
中已经定义了BProperty
和OneObject
,所以我想重用它。然后我猜可能是这样的:
AnotherObject:
type: object
properties:
CProperty:
type: string
anyOf:
- required: [CProperty]
- required: [OneObject]
但没有。