Skip to content

fix(validation-utility): validation for model value dictionary#65

Merged
sufyankhanrao merged 1 commit intomainfrom
64-fix-is-valid-type-utility-for-model-dictionary
Jun 4, 2024
Merged

fix(validation-utility): validation for model value dictionary#65
sufyankhanrao merged 1 commit intomainfrom
64-fix-is-valid-type-utility-for-model-dictionary

Conversation

@sufyankhanrao
Copy link
Copy Markdown
Collaborator

What

This PR fixes the validation of a dictionary that contains a simple model value as the deserialized model is treated as a dictionary. This dictionary was conflicting with the dictionary of some primitive or non-primitive types.

Why

  • To fix the validation bug for the model value dictionary, used for OAF model properties validation.

Closes #64

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

This commit fixes the validation of a dictionary that contains a simple model value as the deserialized model is treated as a dictionary. This dictionary was conflicting with the dictionary of some primitive or non-primitive types.
@sufyankhanrao sufyankhanrao added the bug Something isn't working label Jun 4, 2024
@sufyankhanrao sufyankhanrao self-assigned this Jun 4, 2024
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@sufyankhanrao sufyankhanrao requested a review from asadali214 June 4, 2024 06:46
@sufyankhanrao sufyankhanrao merged commit efd954e into main Jun 4, 2024
@sufyankhanrao sufyankhanrao deleted the 64-fix-is-valid-type-utility-for-model-dictionary branch June 4, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAF case type validation method is incorrectly validating for a dict of custom type values

2 participants