Redocly/redoc

Multiple parallel anyOf keywords are not visible, only the first one is

Open

#1114 opened on Nov 25, 2019

View on GitHub
 (1 comment) (1 reaction) (0 assignees)TypeScript (21,877 stars) (2,272 forks)batch import
Type: BugType: Enhancementhelp wanted

Description

Expected behaviour: Multiple parallel anyOf keywords will result in multiple anyOf UI elements and all parameters are visible: image

Actual behaviour: Only a single anyOf element is displayed and parameters of the second keyword are not visible at all: image

Test schema:

{
  "openapi": "3.0.0",
  "info": {
    "title": "Bug API",
    "version": "1.0.0"
  },
  "paths": {
    "/": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "Schema",
                "allOf": [
                  {
                    "properties": {
                      "allOfParam1": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "anyOf": [
                      {
                        "required": [
                          "anyOf1Param1"
                        ],
                        "title": "anyOf1Param1",
                        "properties": {
                          "anyOf1Param1": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "required": [
                          "anyOf1Param2"
                        ],
                        "title": "anyOf1Param2",
                        "properties": {
                          "anyOf1Param2": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "required": [
                          "anyOf2Param1"
                        ],
                        "title": "anyOf2Param1",
                        "properties": {
                          "anyOf2Param1": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "required": [
                          "anyOf2Param2"
                        ],
                        "title": "anyOf2Param2",
                        "properties": {
                          "anyOf2Param2": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {

        }
      }
    }
  }
}

Contributor guide