This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
(no ticket): [revise] query param include should accept comma separated list of values #1527
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
For context, this PR originated from: matthewvolk/bigrequest#84 as a solution for inconsistent Typescript type definitions being generated from our OpenAPI spec files. I haven't checked if these changes introduce any unintended side effects to other ways our spec files are consumed!
include
query parameter across various API endpoints to indicate thatinclude
accepts a comma-separated list of enum values, rather than one-of an enum value.type: string
andenum: [value1,value2]
resolves to:?include=[value1|value2]
(eithervalue1
orvalue2
) (source: swagger.io)type: array
, where theitems
in the array are oftype: string
and can be one or more ofitems.enum: [value1,value2]
the schema now resolves to:?include=[value1[,value2]
explode: false
is also added to indicate that query parameter values can be expressed in the format:/users?id=3,4,5
as opposed to/users?id=3&id=4&id=5
(source: swagger.io))Anything else?
There are a number of locations in other files that we may want to apply these changes to, but I haven't confirmed that each location accepts a comma separated list of strings. Here is a list: https://github.com/search?q=repo%3Abigcommerce%2Fapi-specs%20%22-%20name%3A%20include%22&type=code