cancel
Showing results for 
Search instead for 
Did you mean: 

Can we combine $ref and xml meta info altogether?

slogic
Occasional Contributor

Can we combine $ref and xml meta info altogether?

Is it legal to declare the following block:

 

 

openapi: 3.0.1
info:
  version: 1.0.0
  title: title
paths: {}
components:
  schemas:
    SomeType:
      type: object
      properties:
        MyAttribute:
          $ref: "#/components/schemas/MyAttributeType"
          xml:
            attribute: true
            name: MyAttributeSpecialName
    MyAttributeType:
      type: object

 

1 REPLY 1
slogic
Occasional Contributor

Re: Can we combine $ref and xml meta info altogether?

Just input example into online editor. It tells me xml meta info is ignored and i need to put it into allOf wrapper or built into schema.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors