Skip to content

Commit 9e8d8a4

Browse files
committed
feat: bumps target OAS version to 3.1.1
fix: additional 3.1.0 constants after merge and v2 release
1 parent 9af3731 commit 9e8d8a4

19 files changed

+22
-22
lines changed

src/Microsoft.OpenApi.Workbench/MainWindow.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</StackPanel>
4141
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
4242
<Label>Version:</Label>
43-
<RadioButton GroupName="Format" Content="V3.1.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_1}" />
43+
<RadioButton GroupName="Format" Content="V3.1.1" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_1}" />
4444
<RadioButton GroupName="Format" Content="V3.0.4" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_0}" />
4545
<RadioButton GroupName="Format" Content="V2.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV2_0}" />
4646
</StackPanel>

src/Microsoft.OpenApi/Models/OpenApiDocument.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void SerializeAsV31(IOpenApiWriter writer)
138138
writer.WriteStartObject();
139139

140140
// openApi;
141-
writer.WriteProperty(OpenApiConstants.OpenApi, "3.1.0");
141+
writer.WriteProperty(OpenApiConstants.OpenApi, "3.1.1");
142142

143143
// jsonSchemaDialect
144144
writer.WriteProperty(OpenApiConstants.JsonSchemaDialect, JsonSchemaDialect);

test/Microsoft.OpenApi.Readers.Tests/V31Tests/OpenApiDocumentTests.ParseDocumentWith31PropertiesWorks.verified.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: '3.1.0'
1+
openapi: '3.1.1'
22
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
33
info:
44
title: Sample OpenAPI 3.1 API

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/docWithExample.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0 # The version of the OpenAPI Specification
1+
openapi: 3.1.1 # The version of the OpenAPI Specification
22
info: # Metadata about the API
33
title: A simple OpenAPI 3.1 example
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/docWithPatternPropertiesInSchema.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: Example API
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/docWithReferenceById.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: ReferenceById
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/documentWith31Properties.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: Sample OpenAPI 3.1 API
44
description: A sample API demonstrating OpenAPI 3.1 features

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/documentWithReusablePaths.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi : 3.1.0
1+
openapi : 3.1.1
22
info:
33
title: Webhook Example
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/documentWithSummaryAndDescriptionInReference.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: '3.1.0'
1+
openapi: '3.1.1'
22
info:
33
version: '1.0.0'
44
title: Swagger Petstore (Simple)

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/documentWithWebhooks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: Webhook Example
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/externalRefById.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: ReferenceById
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/externalRefByJsonPointer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: ReferenceById
44
version: 1.0.0

test/Microsoft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiDocument/externalResource.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: ReferencedById
44
version: 1.0.0

test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.SerializeDocumentWithWebhooksAsV3JsonWorks_produceTerseOutput=False.verified.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"openapi": "3.1.0",
2+
"openapi": "3.1.1",
33
"info": {
44
"title": "Webhook Example",
55
"version": "1.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"openapi":"3.1.0","info":{"title":"Webhook Example","version":"1.0.0"},"paths":{},"components":{"schemas":{"Pet":{"required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}},"webhooks":{"newPet":{"post":{"requestBody":{"description":"Information about a new pet in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}}}}
1+
{"openapi":"3.1.1","info":{"title":"Webhook Example","version":"1.0.0"},"paths":{},"components":{"schemas":{"Pet":{"required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"}}}}},"webhooks":{"newPet":{"post":{"requestBody":{"description":"Information about a new pet in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}}}}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ public async Task SerializeDocumentWithWebhooksAsV3JsonWorks(bool produceTerseOu
19291929
public void SerializeDocumentWithWebhooksAsV3YamlWorks()
19301930
{
19311931
// Arrange
1932-
var expected = @"openapi: '3.1.0'
1932+
var expected = @"openapi: '3.1.1'
19331933
info:
19341934
title: Webhook Example
19351935
version: 1.0.0
@@ -1984,7 +1984,7 @@ public void SerializeDocumentWithRootJsonSchemaDialectPropertyWorks()
19841984
JsonSchemaDialect = "http://json-schema.org/draft-07/schema#"
19851985
};
19861986

1987-
var expected = @"openapi: '3.1.0'
1987+
var expected = @"openapi: '3.1.1'
19881988
jsonSchemaDialect: http://json-schema.org/draft-07/schema#
19891989
info:
19901990
title: JsonSchemaDialectTest
@@ -2027,7 +2027,7 @@ public void SerializeV31DocumentWithRefsInWebhooksWorks()
20272027
[Fact]
20282028
public void SerializeDocWithDollarIdInDollarRefSucceeds()
20292029
{
2030-
var expected = @"openapi: '3.1.0'
2030+
var expected = @"openapi: '3.1.1'
20312031
info:
20322032
title: Simple API
20332033
version: 1.0.0

test/Microsoft.OpenApi.Tests/Models/References/OpenApiPathItemReferenceTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.Tests.Models.References
2020
public class OpenApiPathItemReferenceTests
2121
{
2222
private const string OpenApi = @"
23-
openapi: 3.1.0
23+
openapi: 3.1.1
2424
info:
2525
title: Sample API
2626
version: 1.0.0
@@ -41,7 +41,7 @@ public class OpenApiPathItemReferenceTests
4141
";
4242

4343
private const string OpenApi_2 = @"
44-
openapi: 3.1.0
44+
openapi: 3.1.1
4545
info:
4646
title: Sample API
4747
version: 1.0.0

test/Microsoft.OpenApi.Tests/Models/Samples/docWithDollarId.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.1.1
22
info:
33
title: Simple API
44
version: 1.0.0

test/Microsoft.OpenApi.Tests/Models/Samples/docWithReusableWebhooks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi : 3.1.0
1+
openapi : 3.1.1
22
info:
33
title: Webhook Example
44
version: 1.0.0

0 commit comments

Comments
 (0)