We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c532c4e commit 59240b3Copy full SHA for 59240b3
src/Microsoft.OpenApi/Models/OpenApiSchema.cs
@@ -784,8 +784,8 @@ private void SerializeAsV2(
784
785
private void SerializeTypeProperty(IOpenApiWriter writer, OpenApiSpecVersion version, JsonSchemaType? inferredType = null)
786
{
787
- // Use inferred type from oneOf/anyOf if provided and original type is not set
788
- var typeToUse = inferredType ?? Type;
+ // Use original type or inferred type when the explicit type is not set
+ var typeToUse = Type ?? inferredType;
789
790
if (typeToUse is null)
791
0 commit comments