Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
MaggieKimani1 merged 7 commits intorelease/2.0.0microsoft/OpenAPI.NET:release/2.0.0from
mk/handle-schemas-with-multiple-typesmicrosoft/OpenAPI.NET:mk/handle-schemas-with-multiple-typesCopy head branch name to clipboard
Oct 2, 2024
Merged

Handle upcasting and downcasting of JSON schemas with type arrays#1820
MaggieKimani1 merged 7 commits intorelease/2.0.0microsoft/OpenAPI.NET:release/2.0.0from
mk/handle-schemas-with-multiple-typesmicrosoft/OpenAPI.NET:mk/handle-schemas-with-multiple-typesCopy head branch name to clipboard

Conversation

@MaggieKimani1
Copy link
Contributor

Fixes #1786

src/Microsoft.OpenApi/Models/OpenApiSchema.cs Outdated Show resolved Hide resolved
Copy link
Member

@darrelmiller darrelmiller left a comment

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.

Copy link
Member

@darrelmiller darrelmiller left a comment

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
Copy link

sonarqubecloud bot commented Oct 2, 2024

@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

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.