-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Swagger-UI can't render content inside a parameter #4442
Copy link
Copy link
Closed
Description
| 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: stringConfiguration (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: numberCurrent Behavior
Context
Just an honest labourer trying to document a horrendous API I didn't write 🤣
Reactions are currently unavailable