Skip to content

v3.2: Provide parsing and serialization guidance #4793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: v3.2-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

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/mixed support Encoding Objects can be used with arrays as well as objects.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

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.
@handrews handrews added this to the v3.2.0 milestone Jul 18, 2025
@handrews handrews requested review from a team as code owners July 18, 2025 02:29
@handrews handrews added the media and encoding Issues regarding media type support and how to encode data (outside of query/path params) label Jul 18, 2025
Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, some nits and questions

@ralfhandl ralfhandl requested a review from a team July 18, 2025 08:32
Copy link
Contributor

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks it's much clearer!

handrews and others added 2 commits July 18, 2025 10:16
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
Copy link
Member Author

@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.

@handrews handrews changed the title Provide parsing and serialization guidance v3.2: Provide parsing and serialization guidance Jul 18, 2025
@ralfhandl ralfhandl requested a review from a team July 19, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants