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

Fix handling of nullable enums for 3.0 - #2920

#2920
Merged
baywet merged 4 commits into
microsoft:mainmicrosoft/OpenAPI.NET:mainfrom
Youssef1313:nullable-enumYoussef1313/OpenAPI.NET:nullable-enumCopy head branch name to clipboard
Jul 3, 2026
Merged

Fix handling of nullable enums for 3.0#2920
baywet merged 4 commits into
microsoft:mainmicrosoft/OpenAPI.NET:mainfrom
Youssef1313:nullable-enumYoussef1313/OpenAPI.NET:nullable-enumCopy head branch name to clipboard

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

Previously, this scenario wasn't producing a type and wasn't producing a null value in the enum array.

This fixes it so that they are produced.

In the future, we could also avoid adding a oneOf with a single element in this scenario.

@Youssef1313
Youssef1313 requested a review from a team as a code owner July 1, 2026 16:35
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Fixed
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Fixed
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Outdated
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Outdated
Comment thread test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs Outdated
Comment thread test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs Outdated
Comment thread test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs
Comment thread src/Microsoft.OpenApi/Models/OpenApiSchema.cs Fixed
@Youssef1313
Youssef1313 requested a review from baywet July 2, 2026 12:17
baywet
baywet previously approved these changes Jul 2, 2026

@baywet baywet 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.

Thank you for making the changes!

@Youssef1313

Copy link
Copy Markdown
Member Author

@baywet Is there anything remaining to get this merged? Would we have a new version released before .NET 11 Preview 7 so that we try to get that in aspnetcore repo and possibly build some fixes on our side on top of this?

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

@baywet baywet 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.

Thank you for making the changes!

This was referenced Jul 27, 2026
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.

4 participants

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