Skip to content

Commit

Permalink
Resolve trimmer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Jan 16, 2025
1 parent 3a35cb9 commit 7e512ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Microsoft.OpenApi/Models/OpenApiSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,11 @@ where Type.Value.HasFlag(flag)
writer.WriteOptionalCollection(OpenApiConstants.Type, list, (w, s) => w.WriteValue(s));
}

#if NET5_0_OR_GREATER
private static readonly Array jsonSchemaTypeValues = System.Enum.GetValues<JsonSchemaType>();
#else
private static readonly Array jsonSchemaTypeValues = System.Enum.GetValues(typeof(JsonSchemaType));
#endif

private void DowncastTypeArrayToV2OrV3(JsonSchemaType schemaType, IOpenApiWriter writer, OpenApiSpecVersion version)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PublishAot>true</PublishAot>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>NU1903; IL3000</NoWarn>
<NoWarn>NU1903</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down

0 comments on commit 7e512ab

Please sign in to comment.