Skip to content

OpenAPIParser's merge allOf doesn't merge examples #1200

Open
@manasesjesus

Description

@manasesjesus

I have the following response:

          "200" : {
            "description" : "The request has succeeded.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object",
                  "properties" : {
                    "statistics" : {
                      "allOf" : [ {
                        "$ref" : "#/components/schemas/pageStatistics"
                      }, {
                        "example" : {
                          "currentPage" : 1,
                          "pageSize" : 1
                        }
                      } ]
                    }
                  }
                }
              }
            }
         }

statistics uses a schema which contains a sample response, but it gets overwritten by example and it shall contain only two properties. It renders correctly in SwaggerUI, but not with Redoc as seen in the attached image.

Screen Shot 2020-03-09 at 14 49 23

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions