RapiDoc
RapiDoc copied to clipboard
Query String which is an object is rendered as [object Object] instead of the actual object
In query strings one can use query parameters as follows; param[a][b][c]=1 - to do this inside OpenAPI one defines the query parameter to be an object, the schema is rendered correctly but sadly the example is not as seen below:
Schema:
Example:

This makes testing really cumbersome as one has to manually type it out
can you provide an minimal sample spec for us to recreate this at our end for a quicker response
I think this basically happens when example is an object and not an string:
examples:
ok-response:
value:
message: Success
code: 200
This happen for all example types ( parameters, responses, etc )
This is rendered as [object Object], as an alternative, we can pass it as a json serialized string, but in that scenario it kind of break that schema says is an object.
also worth noting that in Swagger-UI and in RapiDoc(9.3.3) query is generated differently(same OpenApi schema) when I fill Example for filter field with
{ "name": "Qwerty" }
Swagger:
Raipdoc:
sample spec in my case:
"/api/v1/endpoint":
get:
summary: Sample endpoint
parameters:
- name: filter
in: query
description: Sample
style: deepObject
explode: true
schema:
properties:
name:
type: string
example: someName
is_active:
type: boolean
example: true