Clarification on support for application/json encoded object properties in application/x-www-form-urlencoded messages #3331
Labels
clarification
requests to clarify, but not change, part of the spec
media and encoding
Issues regarding media type support and how to encode data (outside of query/path params)
param serialization
Issues related to parameter and/or header serialization
Milestone
I have been trying to read the spec and understand this to understand if some tools are "broken" or if the spec is just ... unclear (or I am reading it wrong). I need to support an application/x-www-form-urlencoded message where some properties are application/json encoded objects. From what I can read in the spec, this should be the expected, default serialization. The section on Encoding Object says: "The Content-Type for encoding a specific property. Default value depends on the property type: for object - application/json; ". I will say that I am very confused by that line when reading the section on "explode":
That doesn't make sense to me since if I want my property to simply be a json string, then I need to set it to explode: false but then it ignores contentType so ... I guess I have to assume it is application/json but then what would be the point of this parameter.
So, could someone tell me how to make the system accept a application/x-www-form-urlencoded message where one of the properties is a json encoded object. I attached a sample spec I created which I tested in Postman and SwaggerUI and they behave differently. I also tried with a codegen tool to see what they did and it was different also. I want to know what is "right" and then maybe I can fix something :)
Thanks
NestedOpenAPISpec.yml.txt
The text was updated successfully, but these errors were encountered: