OpenAPI.NET icon indicating copy to clipboard operation
OpenAPI.NET copied to clipboard

Enables null reference types

Open irvinesunday opened this issue 1 year ago • 1 comments

Fixes https://github.com/microsoft/OpenAPI.NET/issues/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.

irvinesunday avatar Feb 27 '24 12:02 irvinesunday

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Feb 27 '24 12:02 sonarqubecloud[bot]