Skip to content
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

Remove hard validation for additional and optional fields #1030

Merged
merged 14 commits into from
May 22, 2023

Conversation

jillingk
Copy link
Contributor

@jillingk jillingk commented May 15, 2023

Description
Remove hard validation for additional/optional fields so that added parameters will not break integrations. Also had to ignore the logger for oneOf fields (as that validation will fail always).

fixes #1024

@jillingk jillingk requested a review from a team as a code owner May 15, 2023 14:55
Makefile Outdated Show resolved Hide resolved
templates/libraries/okhttp-gson/pojo.mustache Outdated Show resolved Hide resolved
@wboereboom
Copy link
Contributor

I think this also warrants a unit test to verify new behavior

jillingk and others added 3 commits May 16, 2023 09:05
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>
@jillingk
Copy link
Contributor Author

jillingk commented May 16, 2023

I think this also warrants a unit test to verify new behavior

@wboereboom we already have tests for oneOf model (de)serialization, which is the main concern for this fix. In order for them to pass I needed to leave the required parameter validation (basically this is the only requirement for the oneOf models to properly deserialize I found). Afterwards I also checked that for the oneOf model deserialization the warning is supressed. Is there any other scenarios that we need to test you think?

@jillingk jillingk requested review from a team and wboereboom May 19, 2023 12:42
@wboereboom wboereboom requested a review from a team May 22, 2023 11:22
@jillingk jillingk merged commit 18fd21b into develop May 22, 2023
5 checks passed
@jillingk jillingk deleted the removeHardValidation branch May 22, 2023 14:43
@jillingk jillingk added Bug report Indicates that issue has been marked as a possible bug by its creator Fix Indicates a bug fix and removed Bug report Indicates that issue has been marked as a possible bug by its creator labels Jun 1, 2023
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
3 participants