Skip to content

v3.2 Add data vs serialized example fields (3rd try) #4799

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 5 commits into
base: v3.2-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

This replaces PR #4671, and is the result of numerous discussions with @hudlow. Note that PR #4672 is still the update to the Example Objects examples as it required only a one-line update to conform with this PR.

This adds two fields to the Example Object and partially deprecates the existing value field.

dataValue applies to the data that would be passed to schema validation.

serializedValue (which MUST be a string), like externalValue, applies to the serialized form.

Guidance is provided that value (and the shorthand singluar example) are safe for JSON serialization targets and for strings serialized to targets that do not apply further escaping, but are otherwise deprecated due to ambiguous behavior.

  • 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 adds two fields to the Example Object and partially
deprecates the existing `value` field.

`dataValue` applies to the data that would be passed to
schema validation.

`serializedValue` (which MUST be a string), like `externalValue`,
applies to the serialized form.

Guidance is provided that `value` (and the shorthand singluar
`example`) are safe for JSON serialization targets and for strings
serialized to targets that do not apply further escaping, but are
otherwise deprecated due to ambiguous behavior.
@handrews handrews added this to the v3.2.0 milestone Jul 18, 2025
@handrews handrews requested a review from a team as a code owner July 18, 2025 21:46
@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
@handrews handrews requested a review from a team as a code owner July 18, 2025 21:46
@handrews handrews added the example obj/keywords Issues with the Example Object or exampel(s) keywords label Jul 18, 2025
miqui
miqui previously approved these changes Jul 19, 2025
@ralfhandl ralfhandl requested a review from a team July 19, 2025 17:27
Co-authored-by: Ralf Handl <[email protected]>
@handrews
Copy link
Member Author

@ralfhandl both of the issues so far should now be fixed.

@handrews
Copy link
Member Author

@ralfhandl sorry, one more commit as I realized I could improve the language in the other bullet points, and provide an explantation of the expected conversions involved.

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.

Almost there 😎

Co-authored-by: Ralf Handl <[email protected]>
@ralfhandl ralfhandl requested review from miqui and a team July 19, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example obj/keywords Issues with the Example Object or exampel(s) keywords 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