RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

Missing example when documenting parameter as content

Open lafrech opened this issue 1 year ago • 1 comments

Hi.

I have a parameter documented as

          {
            "in": "query",
            "name": "properties",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "example": {
                    "Min": "0"
                  }
                }
              }
            }
          },

(It is a query argument that should be a dictionary with filters as key/value to inject in a request.)

I believe this use case is legit.

In Swagger-UI, the example for this parameter reads as I expect

{
  "Min": "0"
}

In RapiDoc, it reads

[object Object]

FWIW, my API doc is OpenAPI 3.1.0.

I assume this is a use case that is not addressed yet in RapiDoc.

Is this something you would like to support?

Thanks.

Refs:

  • https://swagger.io/docs/specification/describing-parameters/
  • https://swagger.io/docs/specification/adding-examples/

lafrech avatar Jul 10 '24 09:07 lafrech