Skip to content

v3.2: Clarify JSON-compatible YAML #4758

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

Conversation

handrews
Copy link
Member

@handrews handrews commented Jul 4, 2025

I'm stuck at home bored and getting over a cold, so have a PR as I distract myself from missing holiday plans!

This fixes:

Everything in this area is a RECOMMENDED (== SHOULD) so we have some leeway. I have tightened what is recommended but acknowledged previous guidance and simply said that depending on anything allowed by the old guidance but not by the new is NOT RECOMMENDED. I suspect most tools never even noticed, TBH.

  • 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

@handrews handrews added this to the v3.2.0 milestone Jul 4, 2025
@handrews handrews requested review from a team as code owners July 4, 2025 19:10
@handrews handrews added the clarification requests to clarify, but not change, part of the spec label Jul 4, 2025
mikekistler
mikekistler previously approved these changes Jul 4, 2025
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

src/oas.md Outdated
Comment on lines 178 to 179
Previous versions of this specification expressed this requirement in terms of [YAML's JSON schema ruleset](https://yaml.org/spec/1.2/spec.html#id2803231), which defines a subset of the YAML syntax and is unrelated to [[JSON-Schema-2020-12|JSON Schema]].
Despite its name, this ruleset supports features that are not part of JSON, such as distinguishing between integers and floats (see [Data Types](#data-types)) or supporting `!!float .nan` as a value.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know that this is necessary. This content seems fine as part of the description in the PR, in case some one wants to understand the change later, but I don't think we need it in the spec. Just my 2 cents.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be OK with taking it out.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mikekistler the only thing that's really happening here is that the first sentence acknowledges why there may be a compatibility weirdness where something previously within the "RECOMMENDED" is now "NOT RECOMMENDED", but maybe we don't need to make as much of a point about that? The second sentence here is really just me over-explaining.

Copy link

Choose a reason for hiding this comment

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

FWIW, I think better to put it in the spec than force someone to track it down in the PR. (I think we need a better compromise in general, like footnotes.)

Copy link
Member Author

Choose a reason for hiding this comment

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

@hudlow let me see if I can just word it better, so it feels less like a tangent.

@handrews
Copy link
Member Author

handrews commented Jul 5, 2025

After further discussions with @hudlow the character set stuff may not be needed regarding the Example Object, so it's worth considering whether that part needs to be here at all, or whether what's in the JSON and YAML RFCs is sufficient (it probably is).

We don't really need the stuff about character encodings, as it
was there because I was confused about something else.

Also minimize the explanation of the change.
@handrews handrews changed the title v3.2: Clarify JSON-compatible YAML and UTF-8 use v3.2: Clarify JSON-compatible YAML Jul 5, 2025
@handrews
Copy link
Member Author

handrews commented Jul 5, 2025

@hudlow @mikekistler I have removed the bit about character encodings (it is truly not needed, after getting a night of sleep- I've been under the weather, please forgive the confusion) and have slimmed down the explanation as much as I can while still conveying that there's a bit of a danger zone that was technically previously recommended, but was never really intended to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification requests to clarify, but not change, part of the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants