Skip to content

feature/3.1.1 #1894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi.Workbench/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Label>Version:</Label>
<RadioButton GroupName="Format" Content="V3.1.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_1}" />
<RadioButton GroupName="Format" Content="V3.1.1" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_1}" />
<RadioButton GroupName="Format" Content="V3.0.4" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_0}" />
<RadioButton GroupName="Format" Content="V2.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV2_0}" />
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@

writer.WriteStartObject();

// openApi;

Check warning on line 140 in src/Microsoft.OpenApi/Models/OpenApiDocument.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
writer.WriteProperty(OpenApiConstants.OpenApi, "3.1.0");
writer.WriteProperty(OpenApiConstants.OpenApi, "3.1.1");

// jsonSchemaDialect
writer.WriteProperty(OpenApiConstants.JsonSchemaDialect, JsonSchemaDialect);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: '3.1.0'
openapi: '3.1.1'
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
info:
title: Sample OpenAPI 3.1 API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0 # The version of the OpenAPI Specification
openapi: 3.1.1 # The version of the OpenAPI Specification
info: # Metadata about the API
title: A simple OpenAPI 3.1 example
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: Example API
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: ReferenceById
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: Sample OpenAPI 3.1 API
description: A sample API demonstrating OpenAPI 3.1 features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi : 3.1.0
openapi : 3.1.1
info:
title: Webhook Example
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: '3.1.0'
openapi: '3.1.1'
info:
version: '1.0.0'
title: Swagger Petstore (Simple)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: Webhook Example
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: ReferenceById
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: ReferenceById
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: ReferencedById
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi": "3.1.0",
"openapi": "3.1.1",
"info": {
"title": "Webhook Example",
"version": "1.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"}}}}}}
{"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"}}}}}}
6 changes: 3 additions & 3 deletions test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ public async Task SerializeDocumentWithWebhooksAsV3JsonWorks(bool produceTerseOu
public void SerializeDocumentWithWebhooksAsV3YamlWorks()
{
// Arrange
var expected = @"openapi: '3.1.0'
var expected = @"openapi: '3.1.1'
info:
title: Webhook Example
version: 1.0.0
Expand Down Expand Up @@ -1984,7 +1984,7 @@ public void SerializeDocumentWithRootJsonSchemaDialectPropertyWorks()
JsonSchemaDialect = "http://json-schema.org/draft-07/schema#"
};

var expected = @"openapi: '3.1.0'
var expected = @"openapi: '3.1.1'
jsonSchemaDialect: http://json-schema.org/draft-07/schema#
info:
title: JsonSchemaDialectTest
Expand Down Expand Up @@ -2027,7 +2027,7 @@ public void SerializeV31DocumentWithRefsInWebhooksWorks()
[Fact]
public void SerializeDocWithDollarIdInDollarRefSucceeds()
{
var expected = @"openapi: '3.1.0'
var expected = @"openapi: '3.1.1'
info:
title: Simple API
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.OpenApi.Tests.Models.References
public class OpenApiPathItemReferenceTests
{
private const string OpenApi = @"
openapi: 3.1.0
openapi: 3.1.1
info:
title: Sample API
version: 1.0.0
Expand All @@ -41,7 +41,7 @@ public class OpenApiPathItemReferenceTests
";

private const string OpenApi_2 = @"
openapi: 3.1.0
openapi: 3.1.1
info:
title: Sample API
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.1.1
info:
title: Simple API
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi : 3.1.0
openapi : 3.1.1
info:
title: Webhook Example
version: 1.0.0
Expand Down
Loading