Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AllOf with multilevel $ref and param override #520

Closed
am0nshi opened this issue May 30, 2018 · 4 comments
Closed

AllOf with multilevel $ref and param override #520

am0nshi opened this issue May 30, 2018 · 4 comments

Comments

@am0nshi
Copy link

am0nshi commented May 30, 2018

Hi guys, trying to make some inherited response object using reDoc over the swagger.json file.
Currently found that in Response section i see only original "base" file, while i'm referencing on some extended one. In right "Response samples" panel object built seems to be ok.
I'm referencing "#/definitions/EventlistResource" in $ref but in response i have all data from only "#/definitions/BaseResource".

image

Definition example:

    "EventlistResource" : {
      "title" : "EventlistResource",
      "allOf" : [ {
        "$ref" : "#/definitions/BaseResource"
      }, {
        "type" : "object",
        "properties" : {
          "data" : {
            "type" : "array",
            "description" : "eventlist request payload",
            "items" : {
              "$ref" : "#/definitions/EventlistResource_data"
            }
          }
        }
      } ]

BaseResource:

    "BaseResource" : {
      "type" : "object",
      "properties" : {
        "data" : {
          "type" : "array",
          "description" : "Should be filled by inherited collections",
          "items" : {
            "type" : "object",
            "properties" : { }
          }
        },
        "links" : {
          "$ref" : "#/definitions/Links"
        },
        "meta" : {
          "$ref" : "#/definitions/Meta"
        }
      },
      "title" : "BaseResource"
    },

Demo:
https://rebilly.github.io/ReDoc/?url=https://gist.githubusercontent.com/am0nshi/311c9c85489002859ae9314462870791/raw/5733da90e5462d8ba313588efea02218d0ae9182/swagger_redoc.json#
Swagger.json:
https://gist.githubusercontent.com/am0nshi/311c9c85489002859ae9314462870791/raw/5733da90e5462d8ba313588efea02218d0ae9182/swagger_redoc.json

@RomanHotsiy
Copy link
Member

This should be fixed once I merge #511

@RomanHotsiy
Copy link
Member

Fixed by #511

@am0nshi
Copy link
Author

am0nshi commented Jun 5, 2018

@am0nshi
Copy link
Author

am0nshi commented Jun 7, 2018

@RomanGotsiy ^^ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants