OpenAPI-Specification
OpenAPI-Specification copied to clipboard
[Swagger specification] skip the reference object property [OPENAPI 3.+]
Swagger specification :
Consider in the case of "allOf" , i don't want to use one of the properties from my reference object , how should I achieve that?
example :
recipientAddress:
allOf:
- $ref: '#/components/schemas/Addresses'
Addresses:
properties:
addressCategory:
type: string
maxLength: 10
description: Type of Address
enum:
- PERMANENT
- COMMUNICATON
example: PERMANENT
addressLine1:
type: string
maxLength: 40
description: First line of the Address
example: host tower
here i don't want property "addressCategory" in my object "recipientAddress".
What's the point in cross posting here and https://github.com/OAI/OpenAPI-Specification/issues/2116#issuecomment-981813071? Also, when posting snippets, please make sure to use github's markdown otherwise it's hard to read your examples.