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
When using parameters with deepObject and explode, the parameters are only partially escaped. If an object with only 1 depth is provided, it is escaped correctly. But objects with 2 or more depth levels are not escaped correctly. In deeper objects, only the parameter name and 1st level of keys are escaped. Nothing else is escaped including the value.
To reproduce...
Steps to reproduce the behavior:
Create spec with deepObject and explode parameters.
Pass in a 1 depth object as a parameter, observe it is fully escaped.
Pass in a 2 depth object as a parameter, observe it is not fully escaped.
Expected behavior
I expect deep objects passed as parameters with deepObject and explode to be fully escaped, including all the keys and values.
Additional context or thoughts
I see that there are other tickets/issues/prs for deepObject/explode support so I'm not sure how finalized these parameters are. However, the behaviour here doesn't seem correct in any situation.
I have a hacky solution to apply a fix through the parameterBuilders system. It is a bit hacky, both because it grabs the default un-exported oas3 builder and it modifies the value using qs before the http escaping system happens. Changes to serializationOption had no effect.
When using parameters with
deepObject
andexplode
, the parameters are only partially escaped.Q&A (please complete the following information)
Content & configuration
Swagger/OpenAPI definition:
Swagger-Client usage:
Describe the bug you're encountering
When using parameters with
deepObject
andexplode
, the parameters are only partially escaped. If an object with only 1 depth is provided, it is escaped correctly. But objects with 2 or more depth levels are not escaped correctly. In deeper objects, only the parameter name and 1st level of keys are escaped. Nothing else is escaped including the value.To reproduce...
Steps to reproduce the behavior:
Expected behavior
I expect deep objects passed as parameters with
deepObject
andexplode
to be fully escaped, including all the keys and values.Additional context or thoughts
I see that there are other tickets/issues/prs for deepObject/explode support so I'm not sure how finalized these parameters are. However, the behaviour here doesn't seem correct in any situation.
I have a hacky solution to apply a fix through the
parameterBuilders
system. It is a bit hacky, both because it grabs the default un-exported oas3 builder and it modifies the value usingqs
before the http escaping system happens. Changes toserializationOption
had no effect.Click for fix with parameterBuilders
The text was updated successfully, but these errors were encountered: