To include a string array in the query parameters of a Swagger documentation, you can use the following YAML code:
parameters:
- in: query
name: string_array_param
schema:
type: array
items:
type: string
This code defines a parameter named string_array_param
that is included in the query string. The schema
property defines that this parameter is an array
and its items
are of type string
.
You can modify the example above to match your specific needs.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-03 20:47:38 +0000
Seen: 13 times
Last updated: Jul 03 '23