I have 2 schemas (UserDetails
& UserDetails-Create
) with the difference between them being the description property of the birth-date
field.
Is there a way to inherit all properties from UserDetails
but override the description attribute on one of them?
I’m aware that you can modify the required
attribute like this which is nifty:
UserDetails-Create:
required:
- name
- age
- birth-date
allOf:
- $ref: '#/components/schemas/UserDetails'
Wondering if there is a shorthand way similar to the above that solves my problem?
Read more here: Source link