Skip to content

Handle upcasting and downcasting of JSON schemas with type arrays#1820

Merged
MaggieKimani1 merged 7 commits into
release/2.0.0from
mk/handle-schemas-with-multiple-types
Oct 2, 2024
Merged

Handle upcasting and downcasting of JSON schemas with type arrays#1820
MaggieKimani1 merged 7 commits into
release/2.0.0from
mk/handle-schemas-with-multiple-types

Conversation

@MaggieKimani1

Copy link
Copy Markdown
Contributor

Fixes #1786

Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Outdated

@darrelmiller darrelmiller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think if you remove the code that removes the x-nullable this PR looks good.

@darrelmiller darrelmiller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good. Although we should add a test case for when someone provides type as an array and also provides the nullable keyword. It should never happen but the current code would fail if it does.

@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2024

Copy link
Copy Markdown

@MaggieKimani1 MaggieKimani1 merged commit f1c9297 into release/2.0.0 Oct 2, 2024
@MaggieKimani1 MaggieKimani1 deleted the mk/handle-schemas-with-multiple-types branch October 2, 2024 09:30
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.

Handle upcast and downcast of JSON Schemas with multiple types

2 participants