Skip to content

Add JSON Schema 2020-12 metadata annotations to OpenApiSchemaReference #2092

Add JSON Schema 2020-12 metadata annotations to OpenApiSchemaReference

Add JSON Schema 2020-12 metadata annotations to OpenApiSchemaReference #2092

Triggered via pull request June 6, 2025 14:44
Status Success
Total duration 5m 37s
Artifacts

sonarcloud.yml

on: pull_request
check if SONAR_TOKEN is set in github secrets
0s
check if SONAR_TOKEN is set in github secrets
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Build: src/Microsoft.OpenApi/Models/JsonSchemaReference.cs#L136
Nullability of reference types in value of type 'List<JsonNode?>' doesn't match target type 'IList<JsonNode>'.
Build: src/Microsoft.OpenApi/Models/BaseOpenApiReference.cs#L58
Make this an auto-implemented property and remove its backing field. (https://rules.sonarsource.com/csharp/RSPEC-2292)
Build: src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceHolder.cs#L12
Reduce the number of generic parameters in the 'IOpenApiReferenceHolder' interface to no more than the 2 authorized. (https://rules.sonarsource.com/csharp/RSPEC-2436)
Build: src/Microsoft.OpenApi/Models/References/BaseOpenApiReferenceHolder.cs#L10
Reduce the number of generic parameters in the 'BaseOpenApiReferenceHolder' class to no more than the 2 authorized. (https://rules.sonarsource.com/csharp/RSPEC-2436)
Build: src/Microsoft.OpenApi/Reader/V31/OpenApiSchemaDeserializer.cs#L14
Refactor this field to reduce its Cognitive Complexity from 57 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
Build: src/Microsoft.OpenApi/Reader/V31/OpenApiSchemaDeserializer.cs#L201
Loops should be simplified using the "Where" LINQ method (https://rules.sonarsource.com/csharp/RSPEC-3267)
Build: src/Microsoft.OpenApi/Models/BaseOpenApiReference.cs#L87
Change this condition so that it does not always evaluate to 'True'. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: src/Microsoft.OpenApi/Models/BaseOpenApiReference.cs#L88
Change this condition so that it does not always evaluate to 'True'. (https://rules.sonarsource.com/csharp/RSPEC-2589)
Build: src/Microsoft.OpenApi/Models/OpenApiDocument.cs#L262
Refactor this method to reduce its Cognitive Complexity from 31 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
Build: src/Microsoft.OpenApi/Models/OpenApiDocument.cs#L411
Refactor this method to reduce its Cognitive Complexity from 21 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)