Skip to main content

allOf inherits parent required

GET 

/allof-parent-required

Parent object marks the "pet" property as required while its schema is composed via allOf.

Schema:

type: object
properties:
pet:
allOf:
- type: object
properties:
name:
type: string
- type: object
properties:
age:
type: integer
required: [pet]

Responses

Successful response