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
I started playing with adding this but actually wanted to see if this would be something that was desired.
References
The spec is a bit unclear here. I read https://swagger.io/specification/#encoding-object to indicate that the default should be application/json. However, other parts of the spec seem to indicate csv. SPecifically the style value for the Parameter object says that when the value is form "Form style parameters defined by RFC6570. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0." I tried other tools and found that Postman always does csv and I couldn't get it to change while SwaggerUI always generated application/json in the "Try it Out" option. So ... I am not sure what the spec is exactly expecting
The text was updated successfully, but these errors were encountered:
LGraber
changed the title
Forms data with json encoded properties support
Forms data with json encoded properties support (willing to do work if someone says that the feature is expected / desired)
Jul 24, 2023
also note that I am trying to get clarification on the spec as it confuses me. If others in this group know the answer, let me know: OAI/OpenAPI-Specification#3331
Description
We need to support an application/x-www-form-urlencoded message which contains object properties that are json encoded (application/json). Currently, the ogen tool, if "explode" is set to false, is hardcoded to assume csv encoding (https://github.com/ogen-go/ogen/blob/main/uri/query_param_decoder.go#L156). I would like to be able to indicate that it is json encoded via the contentType attribute on the Encoding object which is currently marked as NotImpl (https://github.com/ogen-go/ogen/blob/main/gen/gen_contents.go#L192).
I started playing with adding this but actually wanted to see if this would be something that was desired.
References
The spec is a bit unclear here. I read https://swagger.io/specification/#encoding-object to indicate that the default should be application/json. However, other parts of the spec seem to indicate csv. SPecifically the style value for the Parameter object says that when the value is form "Form style parameters defined by RFC6570. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0." I tried other tools and found that Postman always does csv and I couldn't get it to change while SwaggerUI always generated application/json in the "Try it Out" option. So ... I am not sure what the spec is exactly expecting
The text was updated successfully, but these errors were encountered: