We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 043a592 commit 8f87426Copy full SHA for 8f87426
test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs
@@ -463,5 +463,22 @@ public void SerializeAsV2ShouldSetFormatPropertyInParentSchemaIfPresentInChildre
463
// Assert
464
Assert.Equal(expectedV2Schema, v2Schema);
465
}
466
+
467
+ [Fact]
468
+ public void OpenApiSchemaCopyConstructorSucceeds()
469
+ {
470
+ var baseSchema = new OpenApiSchema()
471
472
+ Type = "string",
473
+ Format = "date"
474
+ };
475
476
+ var actualSchema = new OpenApiSchema(baseSchema)
477
478
+ Nullable = true
479
480
481
+ Assert.Equal("string", actualSchema.Type);
482
+ }
483
484
0 commit comments