openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

AnyOf Keyword Not supported

Open AMcManigal opened this issue 7 years ago • 1 comments

Is the 'anyOf' keyword supported? It doesn't appear to work. See here for the full spec example.

Following is an excerpt of the relevant part. Notice that the healthSigns and animalType objects do not appear in the final parse result.

PetCreatePartTwo:
      type: object
      x-model: PetCreatePartTwo
      properties:
        position:
          $ref: "#/components/schemas/Position"
        healthy:
          type: boolean
        healthSigns:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/FreshBreath'
              - $ref: '#/components/schemas/ShinyCoat'
              - $ref: '#/components/schemas/EyesBright'

        animalType:
          oneOf:
            - $ref: '#/components/schemas/MammalDetails'
            - $ref: '#/components/schemas/AvianDetails'

AMcManigal avatar Apr 30 '18 20:04 AMcManigal

Same for oneOf. I'm trying to make it work, but it doesn't work at all, unfortunately.

[UPDATE] #37 has been resolved. Yay! :-)

diogobaeder avatar May 16 '18 04:05 diogobaeder