I'm having trouble rendering an example request body in openapi. I've distilled it down to this simple example:
openapi: 3.0.2
info:
title: Test
version: "1"
paths:
/Users:
post:
requestBody:
content:
application/json:
example:
name: "John"
responses:
"200":
description: Fetches them
content:
application/json:
example:
- name: John Doe
https://editor.swagger.io/# and a few other tools can't seem to render the Request body. All I get is:
😱 Could not render n, see the console.
Although, the response body renders fine as expected.
What am I doing wrong here
requestBody.content.application/json
having noschema
. Please open an issue at github.com/swagger-api/swagger-ui/issues – Staples