RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

Overridden description / summary of reference objects not shown

Open tib-c opened this issue 1 year ago • 1 comments

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.

tib-c avatar Oct 30 '23 13:10 tib-c

I think this is a duplicate of https://github.com/rapi-doc/RapiDoc/issues/720

wparad avatar Oct 30 '23 13:10 wparad