Skip to content

Commit 8bdfa30

Browse files
baywetCopilot
andcommitted
chore: adapt boolean schema cherry-picks to v2 branch
Remove references to OpenApi3_2 version and Self property which don't exist in the v2 support branch. Keep only v2.0, v3.0, and v3.1 support in tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8b76605 commit 8bdfa30

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

test/Microsoft.OpenApi.Readers.Tests/V31Tests/OpenApiDocumentTests.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -612,25 +612,6 @@ public async Task ValidateReferencedExampleInSchemaWorks()
612612
Assert.Empty(result.Diagnostic.Warnings);
613613
}
614614

615-
[Fact]
616-
public async Task ParseDocumentWithSelfExtensionWorks()
617-
{
618-
// Arrange && Act
619-
var path = Path.Combine(SampleFolderPath, "documentWithSelfExtension.yaml");
620-
var result = await OpenApiDocument.LoadAsync(path, SettingsFixture.ReaderSettings);
621-
622-
// Assert
623-
Assert.NotNull(result.Document);
624-
Assert.NotNull(result.Document.Self);
625-
Assert.Equal("https://example.org/api/openapi.yaml", result.Document.Self.ToString());
626-
Assert.Equal("API with x-oai-$self extension", result.Document.Info.Title);
627-
Assert.Equal("1.0.0", result.Document.Info.Version);
628-
// The x-oai-$self extension should be moved to the Self property and not remain in extensions
629-
Assert.Null(result.Document.Extensions);
630-
Assert.Empty(result.Diagnostic.Errors);
631-
Assert.Empty(result.Diagnostic.Warnings);
632-
}
633-
634615
[Fact]
635616
public void LoadDocumentWithBooleanSchemaShouldNotThrowNullReferenceException()
636617
{

test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ public class OpenApiSchemaTests
208208
[InlineData(OpenApiSpecVersion.OpenApi2_0)]
209209
[InlineData(OpenApiSpecVersion.OpenApi3_0)]
210210
[InlineData(OpenApiSpecVersion.OpenApi3_1)]
211-
[InlineData(OpenApiSpecVersion.OpenApi3_2)]
212211
public async Task SerializeBasicSchemaAsJsonWorks(OpenApiSpecVersion version)
213212
{
214213
// Arrange

0 commit comments

Comments
 (0)