-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
base: v3.2-dev
Are you sure you want to change the base?
Conversation
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.
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.
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> | |
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.
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.
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.
done
533c6d3
Fixes #4816.
The
explode
field defaults tofalse
withstyle: 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
.