-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
handrews
wants to merge
5
commits into
OAI:v3.2-dev
Choose a base branch
from
handrews:ex-obj-3
base: v3.2-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This was referenced Jul 18, 2025
miqui
previously approved these changes
Jul 19, 2025
3 tasks
ralfhandl
requested changes
Jul 19, 2025
Co-authored-by: Ralf Handl <[email protected]>
@ralfhandl both of the issues so far should now be fixed. |
@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. |
ralfhandl
requested changes
Jul 19, 2025
There was a problem hiding this 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
approved these changes
Jul 19, 2025
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)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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), likeexternalValue
, applies to the serialized form.Guidance is provided that
value
(and the shorthand singluarexample
) 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.