Skip to content

v3.2: Bug fix: deepObject explode default behavior. #4818

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

Conversation

handrews
Copy link
Member

@handrews handrews commented Aug 2, 2025

Fixes #4816.

The explode field defaults to false with style: deepObject, but the behavior of that combination is undefined in 3.0 and 3.1.

For 3.2, define it to behave the same as style: deepObject, explode: true, which maintains compatibility (by defining previously undefined behavior rather than changing the defined default value) and produces intuitive results.

Note that there is no need to update the Header Object because it does not allow style: deepObject.

  • 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

The `explode` field defaults to `false` with `style: deepObject`,
but the behavior of that combination is undefined in 3.0 and 3.1.

For 3.2, define it to behave the same as
`style: deepObject, explode: true`, which maintains compatibility
(by defining previously undefined behavior rather than changing
the defined default value) and produces intuitive results.
@handrews handrews added this to the v3.2.0 milestone Aug 2, 2025
@handrews handrews requested review from a team as code owners August 2, 2025 18:58
@handrews handrews added the bug label Aug 2, 2025
@handrews handrews linked an issue Aug 2, 2025 that may be closed by this pull request
karenetheridge
karenetheridge previously approved these changes Aug 3, 2025
mikekistler
mikekistler previously approved these changes Aug 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. 👍

Nice solution!

src/oas.md Outdated
@@ -1236,7 +1236,7 @@ The following table shows serialized examples, as would be shown with the `seria
| spaceDelimited | true | _n/a_ | _n/a_ | _n/a_ | _n/a_ |
| pipeDelimited | false | _n/a_ | _n/a_ | <span style="white-space: nowrap;">color=blue%7Cblack%7Cbrown</span> | <span style="white-space: nowrap;">color=R%7C100%7CG%7C200%7CB%7C150</span> |
| pipeDelimited | true | _n/a_ | _n/a_ | _n/a_ | _n/a_ |
| deepObject | false | _n/a_ | _n/a_ | _n/a_ | _n/a_ |
| deepObject | false | _n/a_ | _n/a_ | _n/a_ | <span style="white-space: nowrap;">color%5BR%5D=100&color%5BG%5D=200&color%5BB%5D=150</span> |
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we express that with one table line where the "explode" column says "false or true"? Then readers don't have to mentally diff the values in the two table lines.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@handrews handrews dismissed stale reviews from mikekistler and karenetheridge via 533c6d3 August 7, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v3.1.1: style:deepObject should default to explode:true
4 participants