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

Enables null reference types #1569

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft

Enables null reference types #1569

wants to merge 4 commits into from

Conversation

irvinesunday
Copy link
Contributor

Fixes #1202

NB
This is still a draft PR. Early feedback is welcomed though.

This draft PR:

  • Enables nullable reference types on the global Microsoft.OpenApi model project.

The changes expected to come in here will be massive, so it is good to have early feedback and incorporate feedback early on, instead of at the very last stage.

In this and upcoming changes, all model properties will be made nullable except those which are REQUIRED. When writing out the nullable properties, the compiler complains of possible null reference arguments. Since argument nullability is checked at the OpenApiWriter methods level, we shall be using the null forgiving operator (!) to remove the compiler warnings.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
43.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Base automatically changed from release/2.0.0 to vnext November 5, 2024 11: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.

1 participant