Swagger-UI can't render `content` inside a parameter
See original GitHub issue| Q | A |
|---|---|
| Bug or feature request? | Bug |
| Which Swagger/OpenAPI version? | 3.0.0 |
| Which Swagger-UI version? | v3.13.4 |
| How did you install Swagger-UI? | standalone-dist |
| Which browser & version? | Firefox 61.0a1 |
| Which operating system? | Mac Sierra |
Demonstration API definition
Try and add a query parameter referencing an object (which according to the spec is a valid thing to do)
- name: users
in: query
description: List of users to query for
content:
application/json:
schema:
$ref: "#/components/schemas/UserArray"
components:
schemas:
UserArray:
type: array
items:
$ref: "#/components/schemas/User"
User:
required:
- userId
- currency
properties:
userId:
type: integer
format: int32
currency:
type: string
Configuration (browser query string, constructor, config.yaml)
I am using no additional config options, everything is vanilla.
Expected Behavior
The UI should offer me a nice way of typing in arrays of objects in a query param. According to the documentation this should be possible:
in: query
name: coordinates
content:
application/json:
schema:
type: object
required:
- lat
- long
properties:
lat:
type: number
long:
type: number
Current Behavior
Context
Just an honest labourer trying to document a horrendous API I didn’t write 🤣
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:16 (7 by maintainers)
Top Results From Across the Web
asp.net - Swagger UI doesn't render body parameter field for ...
My GET action is working fine when testing from Postman and filling the json in the body of the request. By setting breakpoint...
Read more >Issue with JSON content in query parameter
when i open this schema in swagger UI , it doesnt render JSON query parameters. ( Could not render this component,...
Read more >Enriched Web API Documentation using Swagger/OpenAPI in ...
API Documentation generation tools (e.g., Swagger UI, Redoc, etc.) to render our OpenAPI definition (e.g., as a web page).
Read more >Swagger documentation customisation | Europe PMC Tech Blog
This is a callback function parameter which can be passed to be notified of when SwaggerUI encountered a failure was unable to render....
Read more >Using OpenAPI and Swagger UI - Quarkus
The solution is located in the openapi-swaggerui-quickstart directory. ... You can request the OpenAPI in JSON format using the format query parameter.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@shockey do you guys have any plan to support this? Or is there any chance that we can help/ contribute.
@vinhlh : Yes, just follow the way of writing the path parameters and query parameters on the link: https://swagger.io/docs/specification/describing-parameters/
It really worked for me.