Forum Discussion
frankkilcommins
9 months agoStaff
kawad1 The rendering of `oneOf` in query parameters as you expect is not currently supported in SwaggerUI. Feel free to register an issue at https://github.com/swagger-api/swagger-ui/issues
However, based on your use case, you should achieve all that you need by just having the `deviceIds` as an array.
- name: deviceIds
in: query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
If you really want to have two separate schemas for a single string and an array of strings, then split into two parameters.
- name: deviceId
in: query
description: "Single device ID"
required: false
schema:
type: string
- name: deviceIds
in: query
description: "Multiple device IDs"
required: false
style: form
explode: true
schema:
type: array
items:
type: string
Hope this helps.
Related Content
- 12 years ago
- 3 years ago
- 7 years ago
Recent Discussions
- 7 days ago
- 7 days ago
- 24 days ago