Skip to content

Non-string discriminator values have undefined behavior (3.0.4) #3728

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

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

handrews
Copy link
Member

The "undefined" wording was chosen to allow implementations that make a good-faith effort to accommodate non-string values to remain compliant. However, new implementations are not expected to implement any sort of type coersion, and this guides API designers away from that expectation.

If accepted, I will port this to 3.1.1. For 3.2.0 we might either want to strengthen this to outright forbid non-strings or define a mapping for at least certain non-strings (e.g. booleans).

The "undefined" wording was chosen to allow implementations
that make a good-faith effort to accommodate non-string values
to remain compliant.  However, new implementations are not
expected to implement any sort of type coersion, and this
guides API designers away from that expectation.
@handrews handrews added discriminator clarification requests to clarify, but not change, part of the spec labels Apr 20, 2024
@handrews handrews added this to the v3.0.4 milestone Apr 20, 2024
@handrews handrews requested a review from a team April 20, 2024 20:24
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. 👍

@handrews
Copy link
Member Author

Since there are two TSC approvals here, I'm going to hit the merge button - the TSC emphasized again in today's TDC call that the 2nd TSC approver can merge, so I'm assuming I can merge with 2 TSC approvals.

@handrews handrews merged commit 1823463 into OAI:v3.0.4-dev Apr 25, 2024
@handrews handrews deleted the disc-strings branch April 25, 2024 21:02
lornajane added a commit that referenced this pull request May 1, 2024
Non-string discriminator values (3.1.1 port of #3728)
lornajane added a commit that referenced this pull request May 1, 2024
Non-string discriminator values (3.2.0 port of #3728)
@handrews handrews mentioned this pull request May 14, 2024
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 discriminator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants