Skip to content

ITT-598: Strict OneOf validation for deserialization against multiple models #1054

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 3 commits into from
Jun 19, 2023

Conversation

jillingk
Copy link
Contributor

This PR fixes the sweepschedule issue. Check the SweepConfigurationV2Schedule.java class to see how the deserialization has been changed in order to account for the issue.

@jillingk jillingk added the Fix Indicates a bug fix label Jun 10, 2023
@jillingk jillingk requested a review from a team June 10, 2023 09:43
AlexandrosMor
AlexandrosMor previously approved these changes Jun 12, 2023
@wboereboom
Copy link
Contributor

I would prefer some more explicit (unit) testing around the issue to make sure it works, and to make sure we won't break anything else.

michaelpaul
michaelpaul previously approved these changes Jun 15, 2023
@michaelpaul michaelpaul changed the title Soft OneOf validation for deserialization against multiple models ITT-598: Soft OneOf validation for deserialization against multiple models Jun 15, 2023
@michaelpaul michaelpaul self-requested a review June 15, 2023 13:27
@michaelpaul michaelpaul dismissed stale reviews from AlexandrosMor and themself via 359c867 June 19, 2023 12:17
@michaelpaul michaelpaul changed the title ITT-598: Soft OneOf validation for deserialization against multiple models ITT-598: Strict OneOf validation for deserialization against multiple models Jun 19, 2023
Validation for oneOf is strict, other models no.
Copy link
Contributor

@michaelpaul michaelpaul left a comment

Choose a reason for hiding this comment

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

We are making oneOf validation strict to avoid ambiguities and allowing other (simple) models to ignore (new) fields missing from the specifications at the time the library was built.

New fields might eventually appear in responses received by users of old versions. These fields will be ignored instead of crashing. When a user needs the ignored field, one must upgrade to a new library version.

@michaelpaul michaelpaul merged commit 3cc06a8 into develop Jun 19, 2023
@michaelpaul michaelpaul deleted the SweepScheduleFix branch June 19, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Indicates a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants