Forum Discussion

devinda's avatar
Occasional Visitor
4 months ago

OAS 3.0/3.1 query parameters

Hi everyone,

According to OAS 3.0/3.1, we can describe the way that query parameters are arranged using the style and explode keywords. Let's say we use 2 query parameters named q1 and q2 with the values 5 and 6. So, the URL can be as follows:

Now, let's say there is another API which has an object query parameter including two items with keys q1 and q2 and values 5 and 6. If the style is form and explode is true, the URL can be as follows:

As you can see, both endpoints are identical. How can someone differentiate the first one with 2 parameters and the second one with one object parameter? Because if we develop something like a gateway to handle all these requests, it might be confusing to extract query parameters. Also, in this way of object representation, if we include 2 object parameters, then how do we identify if there are 2 objects? How do we identify the end of the first object?

No RepliesBe the first to reply