OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

[Swagger specification] skip the reference object property [OPENAPI 3.+]

Open bmmule opened this issue 5 years ago • 1 comments

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".

bmmule avatar Nov 29 '21 16:11 bmmule

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.

webron avatar Nov 29 '21 16:11 webron