You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mixed type array with array of objects in location path #2276
I used swagger editor to get request URL (GET operation) containing parameter in path location, swagger generated request URL which looks not meaningful and confusing as it contains string "[object]" as a parameter i.e http://10.240.185.191/path/.[object Object].[object Object]
can someone let me know how array of object parameters would be serialized in path location (i.e in URL) in request, so that I can deserialize at server side
@hanumachari I've edited your example to make it a complete OAS document so it's easier for people to test, let me know if I've made any wrong assumptions.
@hanumachari if this is still of interest, the problem here is that the OAS only specifies how to handle one level of parameter nesting. Exploded label-style arrays are serialized as each value separated by ., and it looks like the tool you are using serializes objects as [Object object]. The specification does not have an answer here.
It would be good to at least clarify that this scenario is not supported.
PR merged for 3.0.4 and ported to 3.1.1 in PR #3921 – we now note that representations for array and object properties in the deepObject object are not defined.
Activity
MikeRalphson commentedon Jun 26, 2020
@hanumachari I've edited your example to make it a complete OAS document so it's easier for people to test, let me know if I've made any wrong assumptions.
hanumachari commentedon Jun 26, 2020
@MikeRalphson Thanks a lot :)
handrews commentedon Jan 28, 2024
@hanumachari if this is still of interest, the problem here is that the OAS only specifies how to handle one level of parameter nesting. Exploded label-style arrays are serialized as each value separated by
., and it looks like the tool you are using serializes objects as[Object object]. The specification does not have an answer here.It would be good to at least clarify that this scenario is not supported.
handrews commentedon May 27, 2024
Clarification added in PR #3818
handrews commentedon Jun 21, 2024
PR merged for 3.0.4 and ported to 3.1.1 in PR #3921 – we now note that representations for array and object properties in the deepObject object are not defined.