Skip to content

warning: invalid allOf variant warning if allOf includes oneOf #2827

@corneliu-petrescu

Description

@corneliu-petrescu

Hi,

We're seeing a parse warning when trying to lint the following API spec:

Example: -- invalid allOf variant

---
openapi: 3.0.3
info:
title: Test
version: 3.0.0
servers:
- url: /test
  description: Test
tags:
- name: Test
  description: test
paths:
/test:
  post:
    description: test
    operationId: test
    tags:
      - Test
    requestBody:
      content:
        application/vnd.api+json:
          schema:
            allOf:
              - type: object
                properties:
                  prop1:
                     type: string
                required: [prop1]
              - oneOf:
                  - type: object
                    properties:
                      prop2:
                        type: string
                  - type: object
                    properties:
                      prop3:
                        type: string
    responses:
      '201':
        description: success
        content:
          application/vnd.api+json:
            schema:
              type: object
          location:
            schema:
              type: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions