Skip to content

v3.1+: Should we change how non-schema examples "override" schema examples? #4664

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 opened this issue Jun 6, 2025 · 0 comments
Labels
example obj/keywords Issues with the Example Object or exampel(s) keywords
Milestone

Comments

@handrews
Copy link
Member

handrews commented Jun 6, 2025

@mikekistler noticed the text that (since at least 3.0) has said that examples outside of the Schema Object "override" examples inside of it, and questioned why it should be there.

I think it has to do with the original purpose of the various fields. In this table, I use the PR #4647 field names to describe the intended purpose and actual implementation:

Object(s) Field Intended Purpose Actual Implementation
Schema example dataValue dataValue
Schema examples dataValue dataValue
Parameter, Header, Media Type example serializedValue (but inline if representable in JSON often dataValue but not always?
Example value serializedValue (but inline if representable in JSON often dataValue but not always?
Example externalValue externalSerializedValue (but inline if representable in JSON often dataValue but not always?

So I think "override" just meant "the serialized version is what you actually send/receive", not "the Schema example is wrong and the other example is right."

So maybe there is a clarification of wording there?

@handrews handrews added the example obj/keywords Issues with the Example Object or exampel(s) keywords label Jun 6, 2025
@handrews handrews added this to the v3.1.2 milestone Jun 6, 2025
@handrews handrews changed the title v3.2: Should we change how non-schema examples "override" schema examples? v3.1+: Should we change how non-schema examples "override" schema examples? Jun 6, 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
Projects
None yet
Development

No branches or pull requests

1 participant