Discussions

Ask a Question
Back to All

Arbitrary JSON data in API reference

Hi, we have an API endpoint that can take arbitrary JSON in a part of its request body. We tried to express that by using a field with type: object and additionalProperties: true, and this renders in the API reference as a field where you can add extra fields and give them names and values, but the values are always encoded as strings. So if we type { "foo": 2 } as the value of one of those fields it ends up as "fieldName": "{ \"foo\": 2}" in the payload of the request examples.

Is there a way to make the API reference UI not encode those values as strings, but just include them as is in the payload?