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

fix(oaf): allow nullable value in the type validation #52

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

sufyankhanrao
Copy link
Collaborator

What

This PR fixes the validation flow by allowing the nullable value for type validation of the provided value at the runtime.

Why

As model, defined as oneOf/anyOf case, can contain nullable required properties for which the validation should pass when the value is null.

closes #51

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

If a new dependency is being added, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Policy-of-adding-new-dependencies-in-the-core-libraries

Breaking change

If the PR is introducing a breaking change, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Guidelines-for-maintaining-core-libraries

Testing

List the steps that were taken to test the changes

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@sufyankhanrao sufyankhanrao self-assigned this Feb 2, 2024
This commit fixes the validation flow by allowing the nullable value for type validation of value at the runtime. As model, defined as oneOf/anyOf case, can contain nullable required properties for which the validation should pass when the value is null.

closes #51
@sufyankhanrao sufyankhanrao force-pushed the 51-fix-validation-for-nullable-value branch from 13ba640 to 694f491 Compare February 2, 2024 21:07
Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@asadali214 asadali214 self-requested a review February 3, 2024 17:22
@asadali214 asadali214 merged commit e8a07c1 into main Feb 3, 2024
7 checks passed
@asadali214 asadali214 deleted the 51-fix-validation-for-nullable-value branch February 3, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add nullable support in checking the validity of an OAF case value
2 participants