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

Overridden description / summary of reference objects not shown #971

Open
tib-c opened this issue Oct 30, 2023 · 1 comment
Open

Overridden description / summary of reference objects not shown #971

tib-c opened this issue Oct 30, 2023 · 1 comment

Comments

@tib-c
Copy link

tib-c commented Oct 30, 2023

A response "myResponse" is defined in the components section of the spec. In the path "myPath" it is referenced within the "get"-operations response 200. As described in the spec the fields "summary" and "description" can be overidden when a reference object is used. In the following example, the description of the reference is overridden with a local description.

{
  "openapi": "3.1.0",
  "info": {
    "title": "BUG API",
    "version": "1.0"
  },
  "paths": {
    "/myPath": {
      "get": {
        "responses": {
          "200": {
            "$ref": "#/components/responses/myResponse",
            "description": "Override description where used"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "myResponse": {
        "description": "Original description from component"
      }
    }
  }
}

Rendered by RapiDoc:
grafik

Current behaviour: RapiDoc renders the description from the component
Correct behaviour: The local description should be shown.

The field "summary" is not available for response objects, so it only concerns the description. Other component types were not tested yet, as that might occur for other types too.

@wparad
Copy link

wparad commented Oct 30, 2023

I think this is a duplicate of #720

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