Uh oh!
There was an error while loading. Please reload this page.
v3.2: Provide parsing and serialization guidance - #4793
Conversation
This creates a "Working with Data" section that incorporates the existing "Data Types" section (with some section level adjustments) along with new guidance on mapping different kinds of data between serialized, data, and application forms. This terminology matches the terminology currently being considered for examples. The application form is largely out of scope for the OAS, and is mainly included to clarify this scope while acknowledging that the OAS may influence such things. Most of the new material is on parsing and serializing, briefly addressing JSON as the common case before going into detail on non-JSON data, with examples. This is where the requirements for schema and/or instance inspection/searching are listed. The only additional change is no longer mentioning the property schema in the Encoding Object, in part because with the new `multipart/mixed` support Encoding Objects can be used with arrays as well as objects.
ralfhandl
left a comment
There was a problem hiding this comment.
+1, some nits and questions
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ralf Handl <ralf.handl@sap.com>
Provide examples of narrowing multiple types, and make it clear that every schema without a `type` keyword allows all types. Also note that implementations MAY go beyond these requirements, but set boundaries on what they can do.
handrews
commented
Jul 18, 2025
@ralfhandl I have made the other updates, and in the process expanded the example and guidance somewhat. I also restored the MAY allowing further inspection, and put some boundaries on it. Yesterday I had not been able to figure out a good way to bound that but today it seems more tractable. @baywet this might interest you in particular as it does place some restrictions on inferences that can be made about type. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lornajane
left a comment
There was a problem hiding this comment.
Repeat approval since we just dismissed the others' on minor changes. Thanks!
Uh oh!
There was an error while loading. Please reload this page.
NOTE: This PR is a replacement for #4743. @whitlockjc and @baywet it is largely inspired by your questions of how far we need to go to explain how to build on schemas and other parts of the OAS, and how that fits with tools that do not work with runtime data (e.g. code gen). This is now substantially less ambitious and I think much better for it.
This creates a "Working with Data" section that incorporates the existing "Data Types" section (with some section level adjustments) along with new guidance on mapping different kinds of data between serialized, data, and application forms. This terminology matches the terminology currently being considered for examples. Note that "Working with Binary Data" is just moved, but the diff got confused and sort-of makes it look like the heading got deleted.
The application form is largely out of scope for the OAS, and is mainly included to clarify this scope while acknowledging that the OAS may influence such things.
Most of the new material is on parsing and serializing, briefly addressing JSON as the common case before going into detail on non-JSON data, with examples. This is where the requirements for schema and/or instance inspection/searching are listed.
The only additional change is no longer mentioning the property schema in the Encoding Object, in part because with the new
multipart/mixedsupport Encoding Objects can be used with arrays as well as objects.