Skip to content

Multiple oneOf tags not rendering 2.0.0-alpha.29 #569

Open
@viralanomaly

Description

@viralanomaly

I am using "redoc": "2.0.0-alpha.29".

I have pasted a stripped down version of my api that shows what is happening. I was expecting both sets of choices (the oneOfs) from RequestObject to be rendered, but instead I only get Single Piece Identifier and (IdentifierPart1 and IdentifierPart2). There should be another "One Of" line with another set of buttons for the choice in "ObjectWithAnotherOneOf", and "OtherThing" should be rendered all the time. Nothing from ObjectWithAnotherOneOf is being rendered.

I hope this is clear enough of an example!

openapi: 3.0.1
info:
  version: 0.0.1
  title: My RESTful API
servers:
- url: /blah
  description: Development server running locally
paths:
  /thing1:
    post:
      tags:
        - Thing1
      summary: Thing1
      description: All about Thing1
      operationId: api.thing1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestObject'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
components:
  schemas:
    ObjectWithAnotherOneOf:
      allOf:
        - oneOf:
          - $ref: '#/components/schemas/Detail2'
          - $ref: '#/components/schemas/Detail1'
        - $ref: '#/components/schemas/OtherThing'
    OtherThing:
      type: object
      properties:
        details:
          type: string
          description: Placeholder for minimum reproduction
    IdentifierPart1:
      type: object
      properties:
        part1:
          type: string
    IdentifierPart2:
      type: object
      properties:
        part2:
          type: string
    IdentifierPart2Identifier:
      oneOf:
        - $ref: '#/components/schemas/SinglePieceIdentifier'
        - allOf:
          - title: IdentifierPart1 and IdentifierPart2
          - $ref: '#/components/schemas/IdentifierPart1'
          - $ref: '#/components/schemas/IdentifierPart2'
    SinglePieceIdentifier:
      type: object
      title: SinglePieceIdentifier
      properties:
        myIdentifier:
          type: string
    RequestObject:
      allOf:
        - $ref: '#/components/schemas/IdentifierPart2Identifier'
        - $ref: '#/components/schemas/ObjectWithAnotherOneOf'
        - $ref: '#/components/schemas/AnotherDataPiece'
    ResponseObject:
      type: object
      properties:
        details:
          type: string
          description: Placeholder for minimum reproduction
    AnotherDataPiece:
      type: object
      properties:
        dataPiece:
          type: string
    Detail1:
      type: object
      title: Detail 1
      properties:
        detail1:
          type: boolean
          description: Placeholder for minimum reproduction
    Detail2:
      type: object
      title: Detail 2
      properties:
        detail2:
          type: boolean
          description: Placeholder for minimum reproduction
  securitySchemes:
    bearerAuth:
      description: >
        All services must use this method of authentication after a
        successful [Login](#operation/login)
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - bearerAuth: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugopenapiQuestions about specification, validity, and edge cases

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions