diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4b9ba7589..88788e3833 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,8 +75,7 @@ jobs: uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 with: dotnet-version: | - 8.0.x - 9.0.x + 10.0.x - name: Setup Node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 diff --git a/Directory.Build.props b/Directory.Build.props index 94fa7a6e5e..cf02729e13 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,7 +8,7 @@ https://github.com/domaindrivendev/Swashbuckle.AspNetCore true Copyright (c) 2016-$([System.DateTime]::Now.ToString(yyyy)) Richard Morris - net10.0;net9.0;net8.0 + net11.0;net10.0 true true $(IsPackable) @@ -18,6 +18,8 @@ latest true en-US + + $(NoWarn);NU5104 direct + + > [!IMPORTANT] > Version 10.0 of Swashbuckle.AspNetCore introduces breaking changes due to upgrading our dependency on [Microsoft.OpenApi][microsoft-openapi] > to version 2.x.x to add support for generating OpenAPI 3.1 documents. Please see _[Migrating to Swashbuckle.AspNetCore v10][v10-migration]_ for more details. diff --git a/benchmark.ps1 b/benchmark.ps1 index c908d90080..4d77f51f7c 100644 --- a/benchmark.ps1 +++ b/benchmark.ps1 @@ -4,7 +4,7 @@ #Requires -Version 7 param( - [Parameter(Mandatory = $false)][string] $Framework = "net10.0", + [Parameter(Mandatory = $false)][string] $Framework = "net11.0", [Parameter(Mandatory = $false)][string] $Job = "" ) diff --git a/global.json b/global.json index 5aecd4ee4c..2e37faf694 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.202", + "version": "11.0.100-preview.3.26207.106", "allowPrerelease": false, "rollForward": "latestMajor", "paths": [ ".dotnet", "$host$" ] diff --git a/perf/Swashbuckle.AspNetCore.Benchmarks/Swashbuckle.AspNetCore.Benchmarks.csproj b/perf/Swashbuckle.AspNetCore.Benchmarks/Swashbuckle.AspNetCore.Benchmarks.csproj index b876a81442..cee07e4042 100644 --- a/perf/Swashbuckle.AspNetCore.Benchmarks/Swashbuckle.AspNetCore.Benchmarks.csproj +++ b/perf/Swashbuckle.AspNetCore.Benchmarks/Swashbuckle.AspNetCore.Benchmarks.csproj @@ -2,7 +2,7 @@ false Exe - net10.0 + net11.0 True $(MSBuildThisFileDirectory)..\..\src\Swashbuckle.AspNetCore.Swagger\Swashbuckle.AspNetCore.Swagger.snk diff --git a/perf/Swashbuckle.AspNetCore.Benchmarks/XmlCommentsBenchmark.cs b/perf/Swashbuckle.AspNetCore.Benchmarks/XmlCommentsBenchmark.cs index 6f1bab55a9..2e7b15fab8 100644 --- a/perf/Swashbuckle.AspNetCore.Benchmarks/XmlCommentsBenchmark.cs +++ b/perf/Swashbuckle.AspNetCore.Benchmarks/XmlCommentsBenchmark.cs @@ -115,7 +115,11 @@ public void Setup() // Request Body _requestBody = new OpenApiRequestBody { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType() { diff --git a/src/Shared/JsonExtensions.cs b/src/Shared/JsonExtensions.cs index 82a5c4debe..84ab7b2d91 100644 --- a/src/Shared/JsonExtensions.cs +++ b/src/Shared/JsonExtensions.cs @@ -8,24 +8,10 @@ internal static class JsonExtensions { private static readonly JsonSerializerOptions Options = new() { -#if NET9_0_OR_GREATER NewLine = "\n", -#endif WriteIndented = true, }; public static string ToJson(this JsonNode value) - { - if (value.IsJsonNullSentinel()) - { - return "null"; - } - var json = value.ToJsonString(Options); - -#if !NET9_0_OR_GREATER - json = json.Replace("\r\n", "\n"); -#endif - - return json; - } + => value.IsJsonNullSentinel() ? "null" : value.ToJsonString(Options); } diff --git a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs index 85ef8f105d..f598cd78c8 100644 --- a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs +++ b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs @@ -117,7 +117,11 @@ private static void ApplySwaggerResponseAttributes( swaggerResponseAttribute.ContentTypes is { } contentTypes) { concrete.Content?.Clear(); +#if NET11_0_OR_GREATER + concrete.Content ??= new Dictionary(); +#else concrete.Content ??= new Dictionary(); +#endif foreach (var contentType in contentTypes) { diff --git a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net8.0/PublicAPI.Shipped.txt b/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net8.0/PublicAPI.Shipped.txt deleted file mode 100644 index 3b123b7bc6..0000000000 --- a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net8.0/PublicAPI.Shipped.txt +++ /dev/null @@ -1,2 +0,0 @@ -Swashbuckle.AspNetCore.Annotations.SwaggerResponseAttribute.Description.get -> string -Swashbuckle.AspNetCore.Annotations.SwaggerResponseAttribute.Description.set -> void diff --git a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net8.0/PublicAPI.Unshipped.txt b/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net8.0/PublicAPI.Unshipped.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net9.0/PublicAPI.Shipped.txt b/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net9.0/PublicAPI.Shipped.txt deleted file mode 100644 index 3b123b7bc6..0000000000 --- a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net9.0/PublicAPI.Shipped.txt +++ /dev/null @@ -1,2 +0,0 @@ -Swashbuckle.AspNetCore.Annotations.SwaggerResponseAttribute.Description.get -> string -Swashbuckle.AspNetCore.Annotations.SwaggerResponseAttribute.Description.set -> void diff --git a/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net9.0/PublicAPI.Unshipped.txt b/src/Swashbuckle.AspNetCore.Annotations/PublicAPI/net9.0/PublicAPI.Unshipped.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/IContentValidator.cs b/src/Swashbuckle.AspNetCore.ApiTesting/IContentValidator.cs index 6cd0e20cc1..bfeb0a711b 100644 --- a/src/Swashbuckle.AspNetCore.ApiTesting/IContentValidator.cs +++ b/src/Swashbuckle.AspNetCore.ApiTesting/IContentValidator.cs @@ -1,5 +1,9 @@ using Microsoft.OpenApi; +#if NET11_0_OR_GREATER +using OpenApiMediaType = Microsoft.OpenApi.IOpenApiMediaType; +#endif + namespace Swashbuckle.AspNetCore.ApiTesting; public interface IContentValidator diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/JsonContentValidator.cs b/src/Swashbuckle.AspNetCore.ApiTesting/JsonContentValidator.cs index c850e528ab..0b50bc3fbf 100644 --- a/src/Swashbuckle.AspNetCore.ApiTesting/JsonContentValidator.cs +++ b/src/Swashbuckle.AspNetCore.ApiTesting/JsonContentValidator.cs @@ -1,6 +1,10 @@ using Microsoft.OpenApi; using Newtonsoft.Json.Linq; +#if NET11_0_OR_GREATER +using OpenApiMediaType = Microsoft.OpenApi.IOpenApiMediaType; +#endif + namespace Swashbuckle.AspNetCore.ApiTesting; public sealed class JsonContentValidator : IContentValidator diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/PublicAPI.Shipped.txt b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/PublicAPI.Shipped.txt index b49ca145b4..e1a9b25fa9 100644 --- a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/PublicAPI.Shipped.txt +++ b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/PublicAPI.Shipped.txt @@ -21,7 +21,6 @@ Swashbuckle.AspNetCore.ApiTesting.ContentDoesNotMatchSpecException.ContentDoesNo Swashbuckle.AspNetCore.ApiTesting.HttpHeadersExtensions Swashbuckle.AspNetCore.ApiTesting.IContentValidator Swashbuckle.AspNetCore.ApiTesting.IContentValidator.CanValidate(string mediaType) -> bool -Swashbuckle.AspNetCore.ApiTesting.IContentValidator.Validate(Microsoft.OpenApi.OpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void Swashbuckle.AspNetCore.ApiTesting.IJsonValidator Swashbuckle.AspNetCore.ApiTesting.IJsonValidator.CanValidate(Microsoft.OpenApi.IOpenApiSchema schema) -> bool Swashbuckle.AspNetCore.ApiTesting.IJsonValidator.Validate(Microsoft.OpenApi.IOpenApiSchema schema, Microsoft.OpenApi.OpenApiDocument openApiDocument, Newtonsoft.Json.Linq.JToken instance, out System.Collections.Generic.IEnumerable errorMessages) -> bool @@ -44,7 +43,6 @@ Swashbuckle.AspNetCore.ApiTesting.JsonBooleanValidator.Validate(Microsoft.OpenAp Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator.CanValidate(string mediaType) -> bool Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator.JsonContentValidator() -> void -Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator.Validate(Microsoft.OpenApi.OpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void Swashbuckle.AspNetCore.ApiTesting.JsonNullValidator Swashbuckle.AspNetCore.ApiTesting.JsonNullValidator.CanValidate(Microsoft.OpenApi.IOpenApiSchema schema) -> bool Swashbuckle.AspNetCore.ApiTesting.JsonNullValidator.JsonNullValidator() -> void diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Shipped.txt b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..c7be4850bb --- /dev/null +++ b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Shipped.txt @@ -0,0 +1,2 @@ +Swashbuckle.AspNetCore.ApiTesting.IContentValidator.Validate(Microsoft.OpenApi.OpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void +Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator.Validate(Microsoft.OpenApi.OpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Unshipped.txt b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net10.0/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Shipped.txt b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Shipped.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Unshipped.txt b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..1282a156d3 --- /dev/null +++ b/src/Swashbuckle.AspNetCore.ApiTesting/PublicAPI/net11.0/PublicAPI.Unshipped.txt @@ -0,0 +1,2 @@ +Swashbuckle.AspNetCore.ApiTesting.IContentValidator.Validate(Microsoft.OpenApi.IOpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void +Swashbuckle.AspNetCore.ApiTesting.JsonContentValidator.Validate(Microsoft.OpenApi.IOpenApiMediaType mediaTypeSpec, Microsoft.OpenApi.OpenApiDocument openApiDocument, System.Net.Http.HttpContent content) -> void diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs b/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs index 06e001ce95..7a0a054f37 100644 --- a/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs +++ b/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs @@ -1,6 +1,10 @@ using System.Collections.Specialized; using Microsoft.OpenApi; +#if NET11_0_OR_GREATER +using OpenApiMediaType = Microsoft.OpenApi.IOpenApiMediaType; +#endif + namespace Swashbuckle.AspNetCore.ApiTesting; public sealed class ResponseValidator(IEnumerable contentValidators) diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj b/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj index b426443244..7ac4c05fed 100644 --- a/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj +++ b/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj @@ -10,27 +10,28 @@ - + - - - - - - - - + + + + + + + + + diff --git a/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj b/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj index 1832b2be36..c2ad860ea6 100644 --- a/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj +++ b/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj @@ -14,18 +14,14 @@ - - - - - - - - + + + + diff --git a/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj b/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj index a6183f5014..ecb1b28178 100644 --- a/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj +++ b/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj @@ -78,7 +78,7 @@ - <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 + <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net11.0 <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472 diff --git a/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj b/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj index 2851c7065f..cba4ddb20b 100644 --- a/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj +++ b/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj @@ -17,7 +17,11 @@ - + + + + + diff --git a/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/ApiParameterDescriptionExtensions.cs b/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/ApiParameterDescriptionExtensions.cs index 60b66ef39c..31a2ef394c 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/ApiParameterDescriptionExtensions.cs +++ b/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/ApiParameterDescriptionExtensions.cs @@ -90,12 +90,10 @@ internal static bool IsFromForm(this ApiParameterDescription apiParameter) { bool isEnhancedModelMetadataSupported = true; -#if NET9_0_OR_GREATER if (AppContext.TryGetSwitch("Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported", out var isEnabled)) { isEnhancedModelMetadataSupported = isEnabled; } -#endif var source = apiParameter.Source; var elementType = isEnhancedModelMetadataSupported ? apiParameter.ModelMetadata?.ElementType : null; diff --git a/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs b/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs index f35e0a54b5..c2be78dbfd 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs +++ b/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs @@ -855,7 +855,11 @@ private OpenApiRequestBody GenerateRequestBodyFromBodyParameter( (contentType) => new OpenApiMediaType { Schema = schema - }), + } +#if NET11_0_OR_GREATER + as IOpenApiMediaType +#endif + ), }; } @@ -909,7 +913,11 @@ private OpenApiRequestBody GenerateRequestBodyFromFormParameters( (entry) => entry.Key, (entry) => new OpenApiEncoding { Style = ParameterStyle.Form } ) ?? [] - }) + } +#if NET11_0_OR_GREATER + as IOpenApiMediaType +#endif + ) }; } @@ -1013,11 +1021,7 @@ private OpenApiResponse GenerateResponse( string statusCode, ApiResponseType apiResponseType) { - string description = null; - -#if NET10_0_OR_GREATER - description = apiResponseType.Description; -#endif + string description = apiResponseType.Description; if (string.IsNullOrEmpty(description)) { @@ -1063,7 +1067,13 @@ private static IEnumerable InferResponseContentTypes(ApiDescription apiD .Distinct()]; } - private OpenApiMediaType CreateResponseMediaType(Type modelType, SchemaRepository schemaRepository) + private +#if NET11_0_OR_GREATER + IOpenApiMediaType +#else + OpenApiMediaType +#endif + CreateResponseMediaType(Type modelType, SchemaRepository schemaRepository) { return new OpenApiMediaType { diff --git a/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj b/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj index cf5b7e15e3..aca5140290 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj +++ b/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj @@ -71,7 +71,7 @@ - <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 + <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net11.0 <_SdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472 diff --git a/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.nuspec b/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.nuspec index 7afe4d237d..e3fbaf3005 100644 --- a/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.nuspec +++ b/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.nuspec @@ -13,23 +13,17 @@ $tags$ - - - - - - - + - + - + - + diff --git a/test/Swashbuckle.AspNetCore.ApiTesting.Test/RequestValidatorTests.cs b/test/Swashbuckle.AspNetCore.ApiTesting.Test/RequestValidatorTests.cs index ccc498e114..6270656f66 100644 --- a/test/Swashbuckle.AspNetCore.ApiTesting.Test/RequestValidatorTests.cs +++ b/test/Swashbuckle.AspNetCore.ApiTesting.Test/RequestValidatorTests.cs @@ -275,7 +275,11 @@ public void Validate_ThrowsException_IfRequiredContentIsNotPresent( RequestBody = new OpenApiRequestBody { Required = true, +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { [ "text/plain" ] = new OpenApiMediaType() } @@ -307,7 +311,11 @@ public void Validate_ThrowsException_IfContentMediaTypeIsNotSpecified( { RequestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { [ "application/json" ] = new OpenApiMediaType() } @@ -339,7 +347,11 @@ public void Validate_DelegatesContentValidationToInjectedContentValidators( { RequestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { [ "application/json" ] = new OpenApiMediaType { diff --git a/test/Swashbuckle.AspNetCore.ApiTesting.Test/ResponseValidatorTests.cs b/test/Swashbuckle.AspNetCore.ApiTesting.Test/ResponseValidatorTests.cs index 1c4c31db8e..47b57cd438 100644 --- a/test/Swashbuckle.AspNetCore.ApiTesting.Test/ResponseValidatorTests.cs +++ b/test/Swashbuckle.AspNetCore.ApiTesting.Test/ResponseValidatorTests.cs @@ -140,7 +140,11 @@ public void Validate_ThrowsException_IfExpectedContentIsNotPresent( { [ "200" ] = new OpenApiResponse { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["text/plain"] = new OpenApiMediaType() } @@ -173,7 +177,11 @@ public void Validate_ThrowsException_IfContentMediaTypeIsNotSpecified( { [ "200" ] = new OpenApiResponse { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType() } @@ -206,7 +214,11 @@ public void Validate_DelegatesContentValidationToInjectedContentValidators( { [ "200" ] = new OpenApiResponse { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/ClientGenerator.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/ClientGenerator.cs index 72b4297efd..1ed1aaf3d9 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/ClientGenerator.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/ClientGenerator.cs @@ -1,6 +1,4 @@ -#if NET10_0_OR_GREATER - -using System.Diagnostics; +using System.Diagnostics; using System.Reflection; using System.Text; using System.Text.Json; @@ -368,5 +366,3 @@ static async Task ProcessStream( } } } - -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/CodeGenerationTests.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/CodeGenerationTests.cs index f800251bda..43c5719786 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/CodeGenerationTests.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/CodeGenerationTests.cs @@ -1,6 +1,4 @@ -#if NET10_0_OR_GREATER - -using System.Reflection; +using System.Reflection; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; @@ -134,5 +132,3 @@ private static string GetProjectRoot() => [GeneratedRegex(@"^// Generated using the NSwag toolchain.*$")] private static partial Regex NSwagGenerationComment(); } - -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/HttpServerFixture.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/HttpServerFixture.cs index a752427cd4..c08fc6ba47 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/HttpServerFixture.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/HttpServerFixture.cs @@ -1,5 +1,4 @@ -#if NET10_0_OR_GREATER -using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.AspNetCore.Mvc.Testing; namespace Swashbuckle.AspNetCore.IntegrationTests; @@ -17,4 +16,3 @@ public string ServerUrl } } } -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/KiotaClientTests.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/KiotaClientTests.cs index d819e3ac2f..1cfddd77ed 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/KiotaClientTests.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/KiotaClientTests.cs @@ -1,6 +1,4 @@ -#if NET10_0_OR_GREATER - -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using Microsoft.Kiota.Abstractions.Authentication; using Microsoft.Kiota.Http.HttpClientLibrary; using TodoApp.KiotaClient; @@ -262,5 +260,3 @@ private static async Task WithTodoAppClientAsync(Func await callback(client); } } - -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/NSwagClientTests.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/NSwagClientTests.cs index 1e8a60944b..4723bfc37b 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/NSwagClientTests.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/NSwagClientTests.cs @@ -1,6 +1,4 @@ -#if NET10_0_OR_GREATER - -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using TodoApp.NSwagClient; namespace Swashbuckle.AspNetCore.IntegrationTests; @@ -271,5 +269,3 @@ private static async Task WithTodoAppClientAsync(Func await callback(client); } } - -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/PlaywrightFixture.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/PlaywrightFixture.cs index 300c3fe37f..f1bbb4b8ca 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/PlaywrightFixture.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/PlaywrightFixture.cs @@ -1,5 +1,4 @@ -#if NET10_0_OR_GREATER -using Microsoft.Playwright; +using Microsoft.Playwright; namespace Swashbuckle.AspNetCore.IntegrationTests; @@ -60,4 +59,3 @@ private void EnsureInstalled() } } } -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs index 5d01813839..2b66376e92 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs @@ -112,7 +112,11 @@ public async Task SwaggerEndpoint_ReturnsCorrectPriceExample_ForDifferentCulture [Theory] [InlineData("/swagger/v1/swagger.json", "openapi", "3.0.4")] [InlineData("/swagger/v1/swaggerv2.json", "swagger", "2.0")] +#if NET11_0_OR_GREATER + [InlineData("/swagger/v1/swaggerv3_1.json", "openapi", "3.1.2")] +#else [InlineData("/swagger/v1/swaggerv3_1.json", "openapi", "3.1.1")] +#endif public async Task SwaggerMiddleware_CanBeConfiguredMultipleTimes( string swaggerUrl, string expectedVersionProperty, diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj b/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj index bbcb477290..16a8cbdfea 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj @@ -9,6 +9,7 @@ + @@ -17,47 +18,42 @@ + + + + + + + - - - - - - - - - - - - - - - - - + + + + + diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/UITests.cs b/test/Swashbuckle.AspNetCore.IntegrationTests/UITests.cs index fc5293784b..8af64dfafd 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/UITests.cs +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/UITests.cs @@ -1,5 +1,4 @@ -#if NET10_0_OR_GREATER -using ReDocApp = ReDoc; +using ReDocApp = ReDoc; namespace Swashbuckle.AspNetCore.IntegrationTests; @@ -45,4 +44,3 @@ private sealed class RedocFixture : HttpApplicationFixture; private sealed class SwaggerUIFixture : HttpApplicationFixture; } -#endif diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt similarity index 99% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt index d9243980e2..333476e8b9 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt @@ -1,5 +1,5 @@ { - "openapi": "3.1.1", + "openapi": "3.1.2", "info": { "title": "Test API V1", "description": "A sample API for testing Swashbuckle", diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt similarity index 98% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt index e5a5157471..05ade881c9 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt @@ -1,5 +1,5 @@ { - "openapi": "3.1.1", + "openapi": "3.1.2", "info": { "title": "MinimalAppWithNullableEnums", "version": "1.0" diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt similarity index 98% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt index 2e0806031b..37d9415f66 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt @@ -274,6 +274,7 @@ { "name": "Text", "in": "query", + "description": "Gets or sets the text of the filter.", "required": true, "schema": { "type": "string" @@ -282,6 +283,7 @@ { "name": "IsCompleted", "in": "query", + "description": "Gets or sets a value indicating whether to search completed Todo items.", "required": true, "schema": { "type": "boolean" diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Map.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Map.Program_swaggerRequestUri=v1.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Map.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Map.Program_swaggerRequestUri=v1.verified.txt diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt similarity index 90% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt index 6e9b065305..048170ae70 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt @@ -850,6 +850,118 @@ } } } + }, + "/XmlComments/Car": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product using asParameters record", + "parameters": [ + { + "name": "Id", + "in": "query", + "description": "Uniquely identifies the product", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Description", + "in": "query", + "description": "Describes the product", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/XmlComments/CarWithProduces": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product With Produces attribute", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/XmlComments/CarWithProducesDefaultResponseType": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product With ProducesDefaultResponseType attribute", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + }, + "default": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } } }, "components": { diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt similarity index 90% rename from test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt rename to test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt index 6e9b065305..048170ae70 100644 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt +++ b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/11_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt @@ -850,6 +850,118 @@ } } } + }, + "/XmlComments/Car": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product using asParameters record", + "parameters": [ + { + "name": "Id", + "in": "query", + "description": "Uniquely identifies the product", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Description", + "in": "query", + "description": "Describes the product", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/XmlComments/CarWithProduces": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product With Produces attribute", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/XmlComments/CarWithProducesDefaultResponseType": { + "get": { + "tags": [ + "Xml" + ], + "summary": "Returns a specific product With ProducesDefaultResponseType attribute", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + }, + "default": { + "description": "A Product", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } } }, "components": { diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt deleted file mode 100644 index 6e9b065305..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/8_0/VerifyTests.TypesAreRenderedCorrectly.verified.txt +++ /dev/null @@ -1,1108 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "WebApi", - "version": "v1" - }, - "paths": { - "/annotations/fruit/{id}": { - "post": { - "tags": [ - "Annotations" - ], - "summary": "CreateFruit", - "description": "Create a fruit", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the fruit that will be created", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Description for Body", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fruit" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Description for response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fruit" - } - } - } - } - } - } - }, - "/annotations/singleForm": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/PersonAnnotated" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/PersonAnnotated" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/multipleForms": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "$ref": "#/components/schemas/AddressAnnotated" - } - ] - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "$ref": "#/components/schemas/AddressAnnotated" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromFileAndString": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file", - "tags" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "Description for File", - "format": "binary" - }, - "tags": { - "type": "string" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromFileAndEnum": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "dateTimeKind", - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "dateTimeKind": { - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromObjectAndString": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/AsParameters": { - "get": { - "tags": [ - "Annotations" - ], - "parameters": [ - { - "name": "paramOne", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paramTwo", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paramThree", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "paramFour", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "paramFive", - "in": "query", - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "paramSix", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "paramSeven", - "in": "query", - "schema": { - "type": "string", - "format": "time" - } - }, - { - "name": "paramEight", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "time" - } - }, - { - "name": "paramNine", - "in": "query", - "schema": { - "$ref": "#/components/schemas/DateTimeKind" - } - }, - { - "name": "paramTen", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/DateTimeKind" - } - }, - { - "name": "paramEleven", - "in": "query", - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "paramTwelve", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsParametersRecord" - } - } - } - } - } - } - }, - "/TypeWithTryParse/{tryParse}": { - "get": { - "tags": [ - "WebApi" - ], - "parameters": [ - { - "name": "tryParse", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/weatherforecast": { - "get": { - "tags": [ - "WithOpenApi" - ], - "operationId": "GetWeatherForecast", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeatherForecast" - } - } - } - } - } - } - } - }, - "/WithOpenApi/multipleForms": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "$ref": "#/components/schemas/Address" - } - ] - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "$ref": "#/components/schemas/Address" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFile": { - "post": { - "tags": [ - "WithOpenApi" - ], - "parameters": [ - { - "name": "queryParameter", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileCollection": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "collection" - ], - "type": "object", - "properties": { - "collection": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - } - }, - "encoding": { - "collection": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromBody": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationCustomExchangeRatesDto" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileAndString": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file", - "tags" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "tags": { - "type": "string" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileAndEnum": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "dateTimeKind", - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "dateTimeKind": { - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromObjectAndString": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/XmlComments/Car/{id}": { - "get": { - "tags": [ - "Xml" - ], - "summary": "Returns a specific product", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product id", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 111 - } - ], - "responses": { - "200": { - "description": "A Product Id", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Address": { - "type": "object", - "properties": { - "street": { - "type": "string", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "zipCode": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AddressAnnotated": { - "type": "object", - "properties": { - "street": { - "type": "string", - "description": "Description for Street", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "zipCode": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AsParametersRecord": { - "type": "object", - "properties": { - "paramOne": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "paramTwo": { - "type": "string", - "format": "uuid" - }, - "paramThree": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "paramFour": { - "type": "string", - "format": "date-time" - }, - "paramFive": { - "type": "string", - "format": "date", - "nullable": true - }, - "paramSix": { - "type": "string", - "format": "date" - }, - "paramSeven": { - "type": "string", - "format": "time", - "nullable": true - }, - "paramEight": { - "type": "string", - "format": "time" - }, - "paramNine": { - "$ref": "#/components/schemas/DateTimeKind" - }, - "paramTen": { - "$ref": "#/components/schemas/DateTimeKind" - }, - "paramEleven": { - "type": "number", - "format": "double", - "nullable": true - }, - "paramTwelve": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "CurrenciesRate": { - "required": [ - "currencyFrom", - "currencyTo" - ], - "type": "object", - "properties": { - "currencyFrom": { - "type": "string", - "description": "Currency From", - "nullable": true - }, - "currencyTo": { - "type": "string", - "nullable": true - }, - "rate": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "DateTimeKind": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "Fruit": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Description for Schema" - }, - "OrganizationCustomExchangeRatesDto": { - "required": [ - "currenciesRates" - ], - "type": "object", - "properties": { - "currenciesRates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CurrenciesRate" - }, - "nullable": true - }, - "isUpdated": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "Person": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PersonAnnotated": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "description": "Description for FirstName", - "nullable": true - }, - "lastName": { - "type": "string", - "description": "Description for LastName", - "nullable": true - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Uniquely identifies the product", - "format": "int32" - }, - "description": { - "type": "string", - "description": "Describes the product", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Represents a product" - }, - "WeatherForecast": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date" - }, - "temperatureC": { - "type": "integer", - "format": "int32" - }, - "summary": { - "type": "string", - "nullable": true - }, - "temperatureF": { - "type": "integer", - "format": "int32", - "readOnly": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Annotations" - }, - { - "name": "WebApi" - }, - { - "name": "WithOpenApi" - }, - { - "name": "Xml" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt deleted file mode 100644 index f0b5be055c..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq.verified.txt +++ /dev/null @@ -1,59 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CliExampleWithFactory", - "version": "1.0" - }, - "servers": [ - { - "url": "http://localhost:57556/" - } - ], - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt deleted file mode 100644 index 4e851e3de8..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=2.0.verified.txt +++ /dev/null @@ -1,1477 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Test API V1", - "description": "A sample API for testing Swashbuckle", - "termsOfService": "http://tempuri.org/terms", - "version": "v1" - }, - "paths": { - "/products": { - "post": { - "tags": [ - "CrudActions" - ], - "summary": "Creates a product", - "description": "## Heading 1\r\n\r\n POST /products\r\n {\r\n \"id\": \"123\",\r\n \"description\": \"Some product\"\r\n }", - "operationId": "CreateProduct", - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "", - "required": true, - "schema": { - "$ref": "#/definitions/Product" - }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Product" - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Searches the collection of products by description key words", - "operationId": "SearchProducts", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "kw", - "description": "A list of search terms", - "type": "string", - "default": "foobar" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Product" - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/all": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Get all products", - "description": "```\r\n{\r\n \"Id\":1,\r\n \"Description\":\"\",\r\n \"Status\": 0,\r\n \"Status2\": 1\r\n}\r\n \r\n```", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Product" - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/{id}": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Returns a specific product", - "operationId": "GetProduct", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The product id", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Product" - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "CrudActions" - ], - "summary": "Updates all properties of a specific product", - "operationId": "UpdateProduct", - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "", - "required": true, - "schema": { - "$ref": "#/definitions/Product" - }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "patch": { - "tags": [ - "CrudActions" - ], - "summary": "Updates some properties of a specific product", - "description": "\r\nOnly provided properties will be updated,\r\n other remain unchanged.\r\n\r\nIdentifier must be non-default value\r\n\r\nBody must be specified", - "operationId": "PatchProduct", - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "", - "required": true, - "schema": { - "type": "object", - "additionalProperties": { } - }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "CrudActions" - ], - "summary": "Deletes a specific product", - "operationId": "DeleteProduct", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/payments/authorize": { - "post": { - "tags": [ - "DataAnnotations" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PaymentRequest" - }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - } - }, - "x-purpose": "test" - } - }, - "/payments/{paymentId}/cancel": { - "put": { - "tags": [ - "DataAnnotations" - ], - "parameters": [ - { - "in": "path", - "name": "paymentId", - "required": true, - "type": "string", - "minLength": 6 - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/get-weekly-apppointments": { - "put": { - "tags": [ - "DataAnnotations" - ], - "summary": "Retrieves the list of appointments this week for the specified day.", - "parameters": [ - { - "in": "query", - "name": "dayOfWeek", - "description": "The day of week for which to get appointments.", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/kittens": { - "post": { - "tags": [ - "DynamicTypes" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "x-purpose": "test" - } - }, - "/unicorns": { - "get": { - "tags": [ - "DynamicTypes" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "additionalProperties": { } - } - } - }, - "x-purpose": "test" - } - }, - "/dragons": { - "post": { - "tags": [ - "DynamicTypes" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/single": { - "post": { - "tags": [ - "Files" - ], - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "in": "formData", - "name": "file", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/multiple": { - "post": { - "tags": [ - "Files" - ], - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "in": "formData", - "name": "files", - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/form-with-file": { - "post": { - "tags": [ - "Files" - ], - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "in": "formData", - "name": "name", - "type": "string" - }, - { - "in": "formData", - "name": "file", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/{name}": { - "get": { - "tags": [ - "Files" - ], - "produces": [ - "text/plain", - "application/zip" - ], - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "format": "binary", - "allOf": [ - { - "type": "string", - "format": "binary" - } - ] - } - } - }, - "x-purpose": "test" - } - }, - "/registrations": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "parameters": [ - { - "in": "formData", - "name": "name", - "description": "Summary for Name", - "type": "string" - }, - { - "in": "formData", - "name": "phoneNumbers", - "description": "Summary for PhoneNumbers", - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - { - "in": "formData", - "name": "formFile", - "description": "Description for file", - "type": "string" - }, - { - "in": "formData", - "name": "text", - "description": "Description for Text", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithIgnoreProperties": { - "post": { - "tags": [ - "FromFormParams" - ], - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "in": "formData", - "name": "phoneNumbers", - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithEnumParameter": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "in": "formData", - "name": "name", - "description": "Summary for Name", - "type": "string" - }, - { - "in": "formData", - "name": "phoneNumbers", - "description": "Summary for PhoneNumbers", - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - { - "in": "formData", - "name": "logLevel", - "description": "Summary for LogLevel", - "type": "string" - }, - { - "in": "formData", - "name": "formFile", - "description": "Description for file", - "type": "string" - }, - { - "in": "formData", - "name": "dateTimeKind", - "description": "Description for dateTimeKind", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/country/validate": { - "get": { - "tags": [ - "FromHeaderParams" - ], - "parameters": [ - { - "in": "query", - "name": "country", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/addresses/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "in": "query", - "name": "country", - "description": "3-letter ISO country code", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "city", - "description": "Name of city", - "type": "string", - "default": "Seattle" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/zip-codes/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "in": "query", - "name": "zipCodes", - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "in": "query", - "name": "search", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/Issue3013/Get": { - "get": { - "tags": [ - "Issue3013" - ], - "produces": [ - "text/plain", - "application/json", - "text/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TestResponse" - } - } - }, - "x-purpose": "test" - } - }, - "/promotions": { - "get": { - "tags": [ - "JsonAnnotations" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Promotion" - } - } - } - }, - "x-purpose": "test" - } - }, - "/shapes": { - "post": { - "tags": [ - "PolymorphicTypes" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "text/plain", - "application/json", - "text/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/Rectangle" - } - ] - }, - "x-purpose": "test" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "x-purpose": "test" - } - }, - "/orders": { - "post": { - "tags": [ - "ResponseTypeAnnotations" - ], - "summary": "Creates an order", - "consumes": [ - "application/xml" - ], - "produces": [ - "application/xml" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "", - "required": true, - "schema": { - "$ref": "#/definitions/Order" - }, - "x-purpose": "test" - } - ], - "responses": { - "201": { - "description": "Order created", - "schema": { - "type": "integer", - "format": "int32" - } - }, - "400": { - "description": "Order invalid", - "schema": { - "$ref": "#/definitions/ValidationProblemDetails" - } - } - }, - "x-purpose": "test" - } - }, - "/carts": { - "post": { - "tags": [ - "SwaggerAnnotations" - ], - "operationId": "CreateCart", - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "text/plain", - "application/json", - "text/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "The cart request body", - "schema": { - "$ref": "#/definitions/Cart" - }, - "x-purpose": "test" - } - ], - "responses": { - "201": { - "description": "The cart was created", - "schema": { - "$ref": "#/definitions/Cart" - } - }, - "400": { - "description": "The cart data is invalid" - } - }, - "x-purpose": "test" - } - }, - "/carts/{id}": { - "get": { - "tags": [ - "SwaggerAnnotations" - ], - "externalDocs": { - "description": "External docs for CartsByIdGet", - "url": "https://tempuri.org/carts-by-id-get" - }, - "operationId": "GetCart", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The cart identifier", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Cart" - } - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "SwaggerAnnotations" - ], - "summary": "Deletes a specific cart", - "description": "Requires admin privileges", - "operationId": "DeleteCart", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The cart identifier", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Cart" - } - } - }, - "x-purpose": "test" - } - }, - "/stores": { - "post": { - "tags": [ - "UnboundParams" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "id", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "location", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "UnboundParams" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "locations", - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Store" - } - } - } - }, - "x-purpose": "test" - } - }, - "/stores/{id}": { - "get": { - "tags": [ - "UnboundParams" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Store" - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "in": "query", - "name": "id", - "type": "integer", - "format": "int32" - }, - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "location", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - } - }, - "definitions": { - "Cart": { - "type": "object", - "required": [ - "Id" - ], - "properties": { - "id": { - "type": "integer", - "description": "The cart identifier", - "format": "int32", - "readOnly": true - }, - "cartType": { - "$ref": "#/definitions/CartType" - }, - "basketType": { - "$ref": "#/definitions/CartType" - } - }, - "additionalProperties": false - }, - "CartType": { - "type": "integer", - "description": "The cart type", - "format": "int32", - "enum": [ - 0, - 1 - ] - }, - "Circle": { - "allOf": [ - { - "$ref": "#/definitions/Shape" - }, - { - "type": "object", - "properties": { - "radius": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "CreditCard": { - "type": "object", - "required": [ - "cardNumber", - "expMonth", - "expYear" - ], - "properties": { - "cardNumber": { - "type": "string", - "minLength": 1, - "pattern": "^[3-6]?\\d{12,15}$" - }, - "expMonth": { - "type": "integer", - "format": "int32", - "maximum": 12, - "minimum": 1 - }, - "expYear": { - "type": "integer", - "format": "int32", - "maximum": 99, - "minimum": 14 - } - }, - "additionalProperties": false - }, - "DateTimeKind": { - "type": "integer", - "format": "int32", - "enum": [ - 0, - 1, - 2 - ] - }, - "DayOfWeek": { - "type": "integer", - "format": "int32", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ] - }, - "DiscountType": { - "type": "string", - "enum": [ - "Percentage", - "Amount" - ] - }, - "LogLevel": { - "type": "integer", - "format": "int32", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ] - }, - "Order": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "x-nullable": true - }, - "total": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "PaymentRequest": { - "type": "object", - "required": [ - "creditCard", - "transaction" - ], - "properties": { - "transaction": { - "$ref": "#/definitions/Transaction" - }, - "creditCard": { - "$ref": "#/definitions/CreditCard" - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "description": "Represents a product", - "properties": { - "id": { - "type": "integer", - "description": "Uniquely identifies the product", - "format": "int32" - }, - "description": { - "type": "string", - "description": "Describes the product", - "x-nullable": true - }, - "status": { - "$ref": "#/definitions/ProductStatus" - }, - "status2": { - "$ref": "#/definitions/ProductStatus" - }, - "price": { - "type": "number", - "format": "double", - "maximum": 122.9, - "exclusiveMaximum": true, - "minimum": 0.1, - "exclusiveMinimum": true, - "x-nullable": true - } - }, - "additionalProperties": false, - "example": { - "id": 123, - "description": "foobar", - "price": 14.37 - } - }, - "ProductStatus": { - "type": "integer", - "format": "int32", - "enum": [ - 0, - 1, - 2 - ] - }, - "Promotion": { - "type": "object", - "properties": { - "promo-code": { - "type": "string", - "x-nullable": true - }, - "discountType": { - "$ref": "#/definitions/DiscountType" - } - }, - "additionalProperties": false - }, - "Rectangle": { - "allOf": [ - { - "$ref": "#/definitions/Shape" - }, - { - "type": "object", - "properties": { - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "Shape": { - "type": "object", - "required": [ - "TypeName" - ], - "properties": { - "TypeName": { - "type": "string" - }, - "name": { - "type": "string", - "x-nullable": true - } - }, - "additionalProperties": false, - "discriminator": "TypeName" - }, - "Store": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "location": { - "type": "string", - "x-nullable": true - } - }, - "additionalProperties": false - }, - "TestResponse": { - "type": "object", - "properties": { - "foo": { - "$ref": "#/definitions/TestStruct" - } - }, - "additionalProperties": false - }, - "TestStruct": { - "type": "object", - "properties": { - "a": { - "type": "integer", - "format": "int32" - }, - "b": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "Transaction": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "number", - "format": "double" - }, - "note": { - "type": "string", - "x-nullable": true - } - }, - "additionalProperties": false - }, - "ValidationProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "x-nullable": true - }, - "title": { - "type": "string", - "x-nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "x-nullable": true - }, - "detail": { - "type": "string", - "x-nullable": true - }, - "instance": { - "type": "string", - "x-nullable": true - }, - "errors": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-nullable": true - } - }, - "additionalProperties": { } - } - }, - "tags": [ - { - "name": "CrudActions" - }, - { - "name": "DataAnnotations" - }, - { - "name": "DynamicTypes" - }, - { - "name": "Files" - }, - { - "name": "FromFormParams" - }, - { - "name": "FromHeaderParams" - }, - { - "name": "FromQueryParams" - }, - { - "name": "Issue3013" - }, - { - "name": "JsonAnnotations" - }, - { - "name": "PolymorphicTypes" - }, - { - "name": "ResponseTypeAnnotations" - }, - { - "name": "SwaggerAnnotations", - "description": "Manipulate Carts to your heart's content", - "externalDocs": { - "url": "http://www.tempuri.org" - } - }, - { - "name": "UnboundParams" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt deleted file mode 100644 index d9243980e2..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=3.1.verified.txt +++ /dev/null @@ -1,1802 +0,0 @@ -{ - "openapi": "3.1.1", - "info": { - "title": "Test API V1", - "description": "A sample API for testing Swashbuckle", - "termsOfService": "http://tempuri.org/terms", - "version": "v1" - }, - "paths": { - "/products": { - "post": { - "tags": [ - "CrudActions" - ], - "summary": "Creates a product", - "description": "## Heading 1\r\n\r\n POST /products\r\n {\r\n \"id\": \"123\",\r\n \"description\": \"Some product\"\r\n }", - "operationId": "CreateProduct", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Searches the collection of products by description key words", - "operationId": "SearchProducts", - "parameters": [ - { - "name": "kw", - "in": "query", - "description": "A list of search terms", - "schema": { - "type": "string", - "default": "foobar" - }, - "example": "hello" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/all": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Get all products", - "description": "```\r\n{\r\n \"Id\":1,\r\n \"Description\":\"\",\r\n \"Status\": 0,\r\n \"Status2\": 1\r\n}\r\n \r\n```", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/{id}": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Returns a specific product", - "operationId": "GetProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product id", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 111 - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "CrudActions" - ], - "summary": "Updates all properties of a specific product", - "operationId": "UpdateProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 222 - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "description": "Represents a product", - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "patch": { - "tags": [ - "CrudActions" - ], - "summary": "Updates some properties of a specific product", - "description": "\r\nOnly provided properties will be updated,\r\n other remain unchanged.\r\n\r\nIdentifier must be non-default value\r\n\r\nBody must be specified", - "operationId": "PatchProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 333 - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "text/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "application/*+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "CrudActions" - ], - "summary": "Deletes a specific product", - "operationId": "DeleteProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 444 - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/payments/authorize": { - "post": { - "tags": [ - "DataAnnotations" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/payments/{paymentId}/cancel": { - "put": { - "tags": [ - "DataAnnotations" - ], - "parameters": [ - { - "name": "paymentId", - "in": "path", - "required": true, - "schema": { - "minLength": 6, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/get-weekly-apppointments": { - "put": { - "tags": [ - "DataAnnotations" - ], - "summary": "Retrieves the list of appointments this week for the specified day.", - "parameters": [ - { - "name": "dayOfWeek", - "in": "query", - "description": "The day of week for which to get appointments.", - "schema": { - "description": "The day of the week.", - "default": 4, - "$ref": "#/components/schemas/DayOfWeek" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/kittens": { - "post": { - "tags": [ - "DynamicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { } - }, - "text/json": { - "schema": { } - }, - "application/*+json": { - "schema": { } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/unicorns": { - "get": { - "tags": [ - "DynamicTypes" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/dragons": { - "post": { - "tags": [ - "DynamicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { } - }, - "text/json": { - "schema": { } - }, - "application/*+json": { - "schema": { } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/single": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/multiple": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - } - }, - "encoding": { - "files": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/form-with-file": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "file": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/{name}": { - "get": { - "tags": [ - "Files" - ], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "oneOf": [ - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - } - ] - } - }, - "application/zip": { - "schema": { - "oneOf": [ - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - } - ] - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/registrations": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Summary for Name", - "example": "MyName" - }, - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Summary for PhoneNumbers" - }, - "formFile": { - "type": "string", - "description": "Description for file", - "format": "binary" - }, - "text": { - "type": "string", - "description": "Description for Text" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "phoneNumbers": { - "style": "form" - }, - "formFile": { - "style": "form" - }, - "text": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithIgnoreProperties": { - "post": { - "tags": [ - "FromFormParams" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "encoding": { - "phoneNumbers": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithEnumParameter": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Summary for Name", - "example": "MyName" - }, - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Summary for PhoneNumbers" - }, - "logLevel": { - "description": "Summary for LogLevel", - "$ref": "#/components/schemas/LogLevel" - }, - "formFile": { - "type": "string", - "description": "Description for file", - "format": "binary" - }, - "dateTimeKind": { - "description": "Description for dateTimeKind", - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "phoneNumbers": { - "style": "form" - }, - "logLevel": { - "style": "form" - }, - "formFile": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/country/validate": { - "get": { - "tags": [ - "FromHeaderParams" - ], - "parameters": [ - { - "name": "country", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/addresses/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "name": "country", - "in": "query", - "description": "3-letter ISO country code", - "required": true, - "schema": { - "type": "string", - "example": null - }, - "example": null - }, - { - "name": "city", - "in": "query", - "description": "Name of city", - "schema": { - "type": "string", - "default": "Seattle" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/zip-codes/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "name": "zipCodes", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "search", - "in": "query", - "required": true, - "style": "deepObject", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/Issue3013/Get": { - "get": { - "tags": [ - "Issue3013" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/promotions": { - "get": { - "tags": [ - "JsonAnnotations" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Promotion" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/shapes": { - "post": { - "tags": [ - "PolymorphicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/orders": { - "post": { - "tags": [ - "ResponseTypeAnnotations" - ], - "summary": "Creates an order", - "requestBody": { - "description": "", - "content": { - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "201": { - "description": "Order created", - "content": { - "application/xml": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "400": { - "description": "Order invalid", - "content": { - "application/xml": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/carts": { - "post": { - "tags": [ - "SwaggerAnnotations" - ], - "operationId": "CreateCart", - "requestBody": { - "description": "The cart request body", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - }, - "x-purpose": "test" - }, - "responses": { - "201": { - "description": "The cart was created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - }, - "400": { - "description": "The cart data is invalid" - } - }, - "x-purpose": "test" - } - }, - "/carts/{id}": { - "get": { - "tags": [ - "SwaggerAnnotations" - ], - "externalDocs": { - "description": "External docs for CartsByIdGet", - "url": "https://tempuri.org/carts-by-id-get" - }, - "operationId": "GetCart", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart identifier", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "SwaggerAnnotations" - ], - "summary": "Deletes a specific cart", - "description": "Requires admin privileges", - "operationId": "DeleteCart", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart identifier", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/stores": { - "post": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "location", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "locations", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Store" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/stores/{id}": { - "get": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Store" - } - } - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "location", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - } - }, - "components": { - "schemas": { - "Cart": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The cart identifier", - "format": "int32", - "readOnly": true - }, - "cartType": { - "description": "The type of the cart", - "default": 0, - "$ref": "#/components/schemas/CartType" - }, - "basketType": { - "description": "The cart type", - "deprecated": true, - "$ref": "#/components/schemas/CartType" - } - }, - "additionalProperties": false - }, - "CartType": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "description": "The cart type", - "format": "int32" - }, - "Circle": { - "allOf": [ - { - "$ref": "#/components/schemas/Shape" - }, - { - "type": "object", - "properties": { - "radius": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "CreditCard": { - "required": [ - "cardNumber", - "expMonth", - "expYear" - ], - "type": "object", - "properties": { - "cardNumber": { - "minLength": 1, - "pattern": "^[3-6]?\\d{12,15}$", - "type": "string" - }, - "expMonth": { - "maximum": 12, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "expYear": { - "maximum": 99, - "minimum": 14, - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "DateTimeKind": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "DayOfWeek": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "DiscountType": { - "enum": [ - "Percentage", - "Amount" - ], - "type": "string" - }, - "LogLevel": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "Order": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "total": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "PaymentRequest": { - "required": [ - "creditCard", - "transaction" - ], - "type": "object", - "properties": { - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "creditCard": { - "$ref": "#/components/schemas/CreditCard" - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Uniquely identifies the product", - "format": "int32" - }, - "description": { - "type": [ - "null", - "string" - ], - "description": "Describes the product" - }, - "status": { - "$ref": "#/components/schemas/ProductStatus" - }, - "status2": { - "$ref": "#/components/schemas/ProductStatus" - }, - "price": { - "exclusiveMaximum": 122.9, - "exclusiveMinimum": 0.1, - "type": [ - "null", - "number" - ], - "format": "double" - } - }, - "additionalProperties": false, - "description": "Represents a product", - "example": { - "id": 123, - "description": "foobar", - "price": 14.37 - } - }, - "ProductStatus": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "Promotion": { - "type": "object", - "properties": { - "promo-code": { - "type": [ - "null", - "string" - ] - }, - "discountType": { - "$ref": "#/components/schemas/DiscountType" - } - }, - "additionalProperties": false - }, - "Rectangle": { - "allOf": [ - { - "$ref": "#/components/schemas/Shape" - }, - { - "type": "object", - "properties": { - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "Shape": { - "required": [ - "TypeName" - ], - "type": "object", - "properties": { - "TypeName": { - "type": "string" - }, - "name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "TypeName", - "mapping": { - "Rectangle": "#/components/schemas/Rectangle", - "Circle": "#/components/schemas/Circle" - } - } - }, - "Store": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "location": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false - }, - "TestResponse": { - "type": "object", - "properties": { - "foo": { - "$ref": "#/components/schemas/TestStruct" - } - }, - "additionalProperties": false - }, - "TestStruct": { - "type": "object", - "properties": { - "a": { - "type": "integer", - "format": "int32" - }, - "b": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "Transaction": { - "required": [ - "amount" - ], - "type": "object", - "properties": { - "amount": { - "type": "number", - "format": "double" - }, - "note": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false - }, - "ValidationProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": [ - "null", - "string" - ] - }, - "title": { - "type": [ - "null", - "string" - ] - }, - "status": { - "type": [ - "null", - "integer" - ], - "format": "int32" - }, - "detail": { - "type": [ - "null", - "string" - ] - }, - "instance": { - "type": [ - "null", - "string" - ] - }, - "errors": { - "type": [ - "null", - "object" - ], - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "additionalProperties": { } - } - } - }, - "tags": [ - { - "name": "CrudActions" - }, - { - "name": "DataAnnotations" - }, - { - "name": "DynamicTypes" - }, - { - "name": "Files" - }, - { - "name": "FromFormParams" - }, - { - "name": "FromHeaderParams" - }, - { - "name": "FromQueryParams" - }, - { - "name": "Issue3013" - }, - { - "name": "JsonAnnotations" - }, - { - "name": "PolymorphicTypes" - }, - { - "name": "ResponseTypeAnnotations" - }, - { - "name": "SwaggerAnnotations", - "description": "Manipulate Carts to your heart's content", - "externalDocs": { - "url": "http://www.tempuri.org" - } - }, - { - "name": "UnboundParams" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 5c1875d18e..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=Basic.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,1760 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API V1", - "description": "A sample API for testing Swashbuckle", - "termsOfService": "http://tempuri.org/terms", - "version": "v1" - }, - "paths": { - "/products": { - "post": { - "tags": [ - "CrudActions" - ], - "summary": "Creates a product", - "description": "## Heading 1\r\n\r\n POST /products\r\n {\r\n \"id\": \"123\",\r\n \"description\": \"Some product\"\r\n }", - "operationId": "CreateProduct", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Searches the collection of products by description key words", - "operationId": "SearchProducts", - "parameters": [ - { - "name": "kw", - "in": "query", - "description": "A list of search terms", - "schema": { - "type": "string", - "default": "foobar" - }, - "example": "hello" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/all": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Get all products", - "description": "```\r\n{\r\n \"Id\":1,\r\n \"Description\":\"\",\r\n \"Status\": 0,\r\n \"Status2\": 1\r\n}\r\n \r\n```", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/products/{id}": { - "get": { - "tags": [ - "CrudActions" - ], - "summary": "Returns a specific product", - "operationId": "GetProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product id", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 111 - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "CrudActions" - ], - "summary": "Updates all properties of a specific product", - "operationId": "UpdateProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 222 - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "patch": { - "tags": [ - "CrudActions" - ], - "summary": "Updates some properties of a specific product", - "description": "\r\nOnly provided properties will be updated,\r\n other remain unchanged.\r\n\r\nIdentifier must be non-default value\r\n\r\nBody must be specified", - "operationId": "PatchProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 333 - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "text/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "application/*+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "CrudActions" - ], - "summary": "Deletes a specific product", - "operationId": "DeleteProduct", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 444 - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/payments/authorize": { - "post": { - "tags": [ - "DataAnnotations" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaymentRequest" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/payments/{paymentId}/cancel": { - "put": { - "tags": [ - "DataAnnotations" - ], - "parameters": [ - { - "name": "paymentId", - "in": "path", - "required": true, - "schema": { - "minLength": 6, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/get-weekly-apppointments": { - "put": { - "tags": [ - "DataAnnotations" - ], - "summary": "Retrieves the list of appointments this week for the specified day.", - "parameters": [ - { - "name": "dayOfWeek", - "in": "query", - "description": "The day of week for which to get appointments.", - "schema": { - "$ref": "#/components/schemas/DayOfWeek" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/kittens": { - "post": { - "tags": [ - "DynamicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { } - }, - "text/json": { - "schema": { } - }, - "application/*+json": { - "schema": { } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/unicorns": { - "get": { - "tags": [ - "DynamicTypes" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/dragons": { - "post": { - "tags": [ - "DynamicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { } - }, - "text/json": { - "schema": { } - }, - "application/*+json": { - "schema": { } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/single": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/multiple": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - } - }, - "encoding": { - "files": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/form-with-file": { - "post": { - "tags": [ - "Files" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "file": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/files/{name}": { - "get": { - "tags": [ - "Files" - ], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "oneOf": [ - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - } - ] - } - }, - "application/zip": { - "schema": { - "oneOf": [ - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - }, - { - "type": "string", - "format": "binary" - } - ] - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/registrations": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Summary for Name", - "example": "MyName" - }, - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Summary for PhoneNumbers" - }, - "formFile": { - "type": "string", - "description": "Description for file", - "format": "binary" - }, - "text": { - "type": "string", - "description": "Description for Text" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "phoneNumbers": { - "style": "form" - }, - "formFile": { - "style": "form" - }, - "text": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithIgnoreProperties": { - "post": { - "tags": [ - "FromFormParams" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "encoding": { - "phoneNumbers": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/registrationsWithEnumParameter": { - "post": { - "tags": [ - "FromFormParams" - ], - "summary": "Form parameters with description", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Summary for Name", - "example": "MyName" - }, - "phoneNumbers": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Summary for PhoneNumbers" - }, - "logLevel": { - "$ref": "#/components/schemas/LogLevel" - }, - "formFile": { - "type": "string", - "description": "Description for file", - "format": "binary" - }, - "dateTimeKind": { - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "name": { - "style": "form" - }, - "phoneNumbers": { - "style": "form" - }, - "logLevel": { - "style": "form" - }, - "formFile": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/country/validate": { - "get": { - "tags": [ - "FromHeaderParams" - ], - "parameters": [ - { - "name": "country", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/addresses/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "name": "country", - "in": "query", - "description": "3-letter ISO country code", - "required": true, - "schema": { - "type": "string", - "example": null - }, - "example": null - }, - { - "name": "city", - "in": "query", - "description": "Name of city", - "schema": { - "type": "string", - "default": "Seattle" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/zip-codes/validate": { - "get": { - "tags": [ - "FromQueryParams" - ], - "parameters": [ - { - "name": "zipCodes", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "search", - "in": "query", - "required": true, - "style": "deepObject", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - }, - "/Issue3013/Get": { - "get": { - "tags": [ - "Issue3013" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/TestResponse" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/promotions": { - "get": { - "tags": [ - "JsonAnnotations" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Promotion" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/shapes": { - "post": { - "tags": [ - "PolymorphicTypes" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Rectangle" - }, - { - "$ref": "#/components/schemas/Circle" - } - ] - } - } - }, - "x-purpose": "test" - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/orders": { - "post": { - "tags": [ - "ResponseTypeAnnotations" - ], - "summary": "Creates an order", - "requestBody": { - "description": "", - "content": { - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - }, - "required": true, - "x-purpose": "test" - }, - "responses": { - "201": { - "description": "Order created", - "content": { - "application/xml": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "400": { - "description": "Order invalid", - "content": { - "application/xml": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/carts": { - "post": { - "tags": [ - "SwaggerAnnotations" - ], - "operationId": "CreateCart", - "requestBody": { - "description": "The cart request body", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - }, - "x-purpose": "test" - }, - "responses": { - "201": { - "description": "The cart was created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - }, - "400": { - "description": "The cart data is invalid" - } - }, - "x-purpose": "test" - } - }, - "/carts/{id}": { - "get": { - "tags": [ - "SwaggerAnnotations" - ], - "externalDocs": { - "description": "External docs for CartsByIdGet", - "url": "https://tempuri.org/carts-by-id-get" - }, - "operationId": "GetCart", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart identifier", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "SwaggerAnnotations" - ], - "summary": "Deletes a specific cart", - "description": "Requires admin privileges", - "operationId": "DeleteCart", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The cart identifier", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/stores": { - "post": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "location", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "x-purpose": "test" - }, - "get": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "locations", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Store" - } - } - } - } - } - }, - "x-purpose": "test" - } - }, - "/stores/{id}": { - "get": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Store" - } - } - } - } - }, - "x-purpose": "test" - }, - "put": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "location", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - }, - "delete": { - "tags": [ - "UnboundParams" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-purpose": "test" - } - } - }, - "components": { - "schemas": { - "Cart": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The cart identifier", - "format": "int32", - "readOnly": true - }, - "cartType": { - "$ref": "#/components/schemas/CartType" - }, - "basketType": { - "$ref": "#/components/schemas/CartType" - } - }, - "additionalProperties": false - }, - "CartType": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "description": "The cart type", - "format": "int32" - }, - "Circle": { - "allOf": [ - { - "$ref": "#/components/schemas/Shape" - }, - { - "type": "object", - "properties": { - "radius": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "CreditCard": { - "required": [ - "cardNumber", - "expMonth", - "expYear" - ], - "type": "object", - "properties": { - "cardNumber": { - "minLength": 1, - "pattern": "^[3-6]?\\d{12,15}$", - "type": "string" - }, - "expMonth": { - "maximum": 12, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "expYear": { - "maximum": 99, - "minimum": 14, - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "DateTimeKind": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "DayOfWeek": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "DiscountType": { - "enum": [ - "Percentage", - "Amount" - ], - "type": "string" - }, - "LogLevel": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "Order": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - }, - "total": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "PaymentRequest": { - "required": [ - "creditCard", - "transaction" - ], - "type": "object", - "properties": { - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "creditCard": { - "$ref": "#/components/schemas/CreditCard" - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Uniquely identifies the product", - "format": "int32" - }, - "description": { - "type": "string", - "description": "Describes the product", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/ProductStatus" - }, - "status2": { - "$ref": "#/components/schemas/ProductStatus" - }, - "price": { - "maximum": 122.9, - "exclusiveMaximum": true, - "minimum": 0.1, - "exclusiveMinimum": true, - "type": "number", - "format": "double", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Represents a product", - "example": { - "id": 123, - "description": "foobar", - "price": 14.37 - } - }, - "ProductStatus": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "Promotion": { - "type": "object", - "properties": { - "promo-code": { - "type": "string", - "nullable": true - }, - "discountType": { - "$ref": "#/components/schemas/DiscountType" - } - }, - "additionalProperties": false - }, - "Rectangle": { - "allOf": [ - { - "$ref": "#/components/schemas/Shape" - }, - { - "type": "object", - "properties": { - "height": { - "type": "integer", - "format": "int32" - }, - "width": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - } - ] - }, - "Shape": { - "required": [ - "TypeName" - ], - "type": "object", - "properties": { - "TypeName": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "TypeName", - "mapping": { - "Rectangle": "#/components/schemas/Rectangle", - "Circle": "#/components/schemas/Circle" - } - } - }, - "Store": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "location": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "TestResponse": { - "type": "object", - "properties": { - "foo": { - "$ref": "#/components/schemas/TestStruct" - } - }, - "additionalProperties": false - }, - "TestStruct": { - "type": "object", - "properties": { - "a": { - "type": "integer", - "format": "int32" - }, - "b": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "Transaction": { - "required": [ - "amount" - ], - "type": "object", - "properties": { - "amount": { - "type": "number", - "format": "double" - }, - "note": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ValidationProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "nullable": true - } - }, - "additionalProperties": { } - } - } - }, - "tags": [ - { - "name": "CrudActions" - }, - { - "name": "DataAnnotations" - }, - { - "name": "DynamicTypes" - }, - { - "name": "Files" - }, - { - "name": "FromFormParams" - }, - { - "name": "FromHeaderParams" - }, - { - "name": "FromQueryParams" - }, - { - "name": "Issue3013" - }, - { - "name": "JsonAnnotations" - }, - { - "name": "PolymorphicTypes" - }, - { - "name": "ResponseTypeAnnotations" - }, - { - "name": "SwaggerAnnotations", - "description": "Manipulate Carts to your heart's content", - "externalDocs": { - "url": "http://www.tempuri.org" - } - }, - { - "name": "UnboundParams" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 84b5ecf08c..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CliExample.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,59 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CliExample", - "version": "1.0" - }, - "servers": [ - { - "url": "http://localhost:51071" - } - ], - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 26f06ef714..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,73 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "ConfigFromFile", - "version": "1.0" - }, - "paths": { - "/api/Products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "foo": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index fb35c79785..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomDocumentSerializer.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "swagger": "DocumentSerializerTest3.0" -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 72beb1d9f1..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,54 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CustomUIConfig", - "version": "1.0" - }, - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index db2a6f33fe..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,54 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CustomUIIndex", - "version": "1.0" - }, - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 66da63fb97..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=GenericControllers.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,591 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "1" - }, - "paths": { - "/{tenantId}/orders": { - "post": { - "tags": [ - "Orders" - ], - "summary": "Creates a resource", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The resource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Orders" - ], - "summary": "Delete by Ids", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Ids", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - }, - "/{tenantId}/orders/DeleteById": { - "delete": { - "tags": [ - "Orders" - ], - "summary": "Delete by Id", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Id", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - }, - "/{tenantId}/orders/Delete/List": { - "delete": { - "tags": [ - "Orders" - ], - "summary": "Delete by Id List", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Ids", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - }, - "/{tenantId}/products": { - "post": { - "tags": [ - "Products" - ], - "summary": "Creates a resource", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The resource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Products" - ], - "summary": "Delete by Ids", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Ids", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - }, - "/{tenantId}/products/DeleteById": { - "delete": { - "tags": [ - "Products" - ], - "summary": "Delete by Id", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Id", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - }, - "/{tenantId}/products/Delete/List": { - "delete": { - "tags": [ - "Products" - ], - "summary": "Delete by Id List", - "parameters": [ - { - "name": "tenantId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "deleting Ids", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Deleted", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "404": { - "description": "Failed" - } - } - } - } - }, - "components": { - "schemas": { - "Order": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "subtotal": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Orders" - }, - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt deleted file mode 100644 index 545254baed..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt +++ /dev/null @@ -1,80 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Sample API 1.0", - "version": "1.0" - }, - "paths": { - "/Products": { - "get": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt deleted file mode 100644 index fa7ee19c72..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=2.0.verified.txt +++ /dev/null @@ -1,220 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Sample API 2.0", - "version": "2.0" - }, - "paths": { - "/Products": { - "post": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - }, - "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - }, - "get": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - }, - "/Products/{id}": { - "put": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - }, - "delete": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index fe357e0e13..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=NSwagClientExample.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,474 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "NswagClientExample", - "version": "1.0" - }, - "paths": { - "/Animals": { - "post": { - "tags": [ - "Animals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/SecondLevel": { - "post": { - "tags": [ - "SecondLevel" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/SystemTextJsonAnimals": { - "post": { - "tags": [ - "SystemTextJsonAnimals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/SystemTextJsonDefaultDiscriminatorAnimals": { - "post": { - "tags": [ - "SystemTextJsonDefaultDiscriminatorAnimals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "Animal": { - "required": [ - "animalType" - ], - "type": "object", - "properties": { - "animalType": { - "$ref": "#/components/schemas/AnimalType" - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "animalType", - "mapping": { - "Cat": "#/components/schemas/Cat", - "Dog": "#/components/schemas/Dog" - } - } - }, - "AnimalType": { - "enum": [ - "Cat", - "Dog" - ], - "type": "string" - }, - "BaseType": { - "required": [ - "discriminator" - ], - "type": "object", - "properties": { - "discriminator": { - "type": "string" - }, - "property": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "discriminator", - "mapping": { - "SubSubType": "#/components/schemas/SubSubType" - } - } - }, - "Cat": { - "allOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "Dog": { - "allOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SubSubType": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseType" - }, - { - "type": "object", - "properties": { - "property2": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonAnimal": { - "required": [ - "animalType" - ], - "type": "object", - "properties": { - "animalType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "animalType", - "mapping": { - "Cat": "#/components/schemas/SystemTextJsonCat", - "Dog": "#/components/schemas/SystemTextJsonDog" - } - } - }, - "SystemTextJsonCat": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDefaultDiscriminatorAnimal": { - "required": [ - "$type" - ], - "type": "object", - "properties": { - "$type": { - "type": "string" - }, - "animalType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "$type", - "mapping": { - "Cat": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat", - "Dog": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - } - }, - "SystemTextJsonDefaultDiscriminatorCat": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDefaultDiscriminatorDog": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDog": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - } - } - }, - "tags": [ - { - "name": "Animals" - }, - { - "name": "SecondLevel" - }, - { - "name": "SystemTextJsonAnimals" - }, - { - "name": "SystemTextJsonDefaultDiscriminatorAnimals" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index fcb1f1f2bf..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=OAuth2Integration.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,252 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API V1", - "version": "v1" - }, - "servers": [ - { - "url": "/resource-server" - } - ], - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "oauth2": [ - "readAccess" - ] - } - ] - }, - "post": { - "tags": [ - "Products" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "oauth2": [ - "writeAccess" - ] - } - ] - } - }, - "/products/{id}": { - "get": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "oauth2": [ - "readAccess" - ] - } - ] - }, - "delete": { - "tags": [ - "Products" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "oauth2": [ - "writeAccess" - ] - } - ] - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32", - "readOnly": true - }, - "serialNo": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/ProductStatus" - } - }, - "additionalProperties": false - }, - "ProductStatus": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - } - }, - "securitySchemes": { - "oauth2": { - "type": "oauth2", - "flows": { - "authorizationCode": { - "authorizationUrl": "/auth-server/connect/authorize", - "tokenUrl": "/auth-server/connect/token", - "scopes": { - "readAccess": "Access read operations", - "writeAccess": "Access write operations" - } - } - } - } - } - }, - "security": [ - { - "oauth2": [ - "readAccess", - "writeAccess" - ] - } - ], - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 4a46d91284..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ReDoc.Startup_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,194 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ReDoc", - "version": "1.0" - }, - "paths": { - "/products": { - "post": { - "tags": [ - "Products" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Product" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "get": { - "tags": [ - "Products" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Product" - } - } - } - } - } - }, - "/products/{id}": { - "get": { - "tags": [ - "Products" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Product" - } - } - } - }, - "put": { - "tags": [ - "Products" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Product" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - }, - "patch": { - "tags": [ - "Products" - ], - "consumes": [ - "application/json", - "text/json", - "application/*+json" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "type": "object", - "additionalProperties": { } - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - }, - "delete": { - "tags": [ - "Products" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "definitions": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "x-nullable": true - } - }, - "additionalProperties": false - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt deleted file mode 100644 index 5dc02708a7..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=TestFirst.Startup_swaggerRequestUri=v1-generated.verified.txt +++ /dev/null @@ -1,52 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test-first Example API (Generated)", - "version": "v1" - }, - "paths": { - "/api/users": { - "post": { - "operationId": "CreateUser", - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "password" - ], - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - } - } - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "User created", - "headers": { - "Location": { - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Invalid request" - } - } - } - } - } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 14e9ac594f..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalApp.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,79 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "MinimalApp", - "version": "v1" - }, - "paths": { - "/WeatherForecast": { - "get": { - "tags": [ - "WeatherForecast" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeatherForecast" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeatherForecast" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeatherForecast" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "WeatherForecast": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "temperatureC": { - "type": "integer", - "format": "int32" - }, - "temperatureF": { - "type": "integer", - "format": "int32", - "readOnly": true - }, - "summary": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "WeatherForecast" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index e5a5157471..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MinimalAppWithNullableEnums.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,80 +0,0 @@ -{ - "openapi": "3.1.1", - "info": { - "title": "MinimalAppWithNullableEnums", - "version": "1.0" - }, - "paths": { - "/weatherforecast": { - "get": { - "tags": [ - "MinimalAppWithNullableEnums" - ], - "operationId": "GetWeatherForecast", - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Parent" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "Child": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Parent": { - "type": "object", - "properties": { - "child": { - "type": "null", - "allOf": [ - { - "$ref": "#/components/schemas/Child" - } - ] - }, - "category": { - "enum": [ - 0, - 1, - 2 - ], - "type": [ - "null", - "integer" - ], - "format": "int32" - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "MinimalAppWithNullableEnums" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index c02949b557..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=MvcWithNullable.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,87 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "MvcWithNullable", - "version": "1.0" - }, - "paths": { - "/api/Enum": { - "get": { - "tags": [ - "Enum" - ], - "parameters": [ - { - "name": "logLevel", - "in": "query", - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/LogLevel" - } - ], - "default": 4 - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/RequiredEnum": { - "get": { - "tags": [ - "RequiredEnum" - ], - "parameters": [ - { - "name": "logLevel", - "in": "query", - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/LogLevel" - } - ], - "default": 4 - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "LogLevel": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - } - } - }, - "tags": [ - { - "name": "Enum" - }, - { - "name": "RequiredEnum" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 2e0806031b..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TodoApp.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,473 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Todo API", - "version": "v1" - }, - "paths": { - "/api/items": { - "get": { - "tags": [ - "TodoApp" - ], - "summary": "Get all Todo items", - "description": "Gets all of the current user's todo items.", - "operationId": "ListTodos", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoListViewModel" - } - } - } - } - } - }, - "post": { - "tags": [ - "TodoApp" - ], - "summary": "Create a new Todo item", - "description": "Creates a new todo item for the current user and returns its ID.", - "operationId": "CreateTodo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateTodoItemModel" - } - ], - "description": "Represents the model for creating a new Todo item." - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatedTodoItemModel" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - } - } - }, - "/api/items/{id}": { - "get": { - "tags": [ - "TodoApp" - ], - "summary": "Get a specific Todo item", - "description": "Gets the todo item with the specified ID.", - "operationId": "GetTodo", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Todo item's ID.", - "required": true, - "schema": { - "type": "string", - "description": "The Todo item's ID.", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoItemModel" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "tags": [ - "TodoApp" - ], - "summary": "Delete a Todo item", - "description": "Deletes the todo item with the specified ID.", - "operationId": "DeleteTodo", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Todo item's ID.", - "required": true, - "schema": { - "type": "string", - "description": "The Todo item's ID.", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - } - } - }, - "/api/items/{id}/complete": { - "post": { - "tags": [ - "TodoApp" - ], - "summary": "Mark a Todo item as completed", - "description": "Marks the todo item with the specified ID as complete.", - "operationId": "CompleteTodo", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Todo item's ID.", - "required": true, - "schema": { - "type": "string", - "description": "The Todo item's ID.", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - } - } - }, - "/api/items/{id}/priority": { - "patch": { - "tags": [ - "TodoApp" - ], - "summary": "Updates the priority of a Todo item", - "description": "Updates the priority of the todo item with the specified ID to the specified priority.", - "operationId": "UpdateTodoPriority", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Todo item's ID.", - "required": true, - "schema": { - "type": "string", - "description": "The Todo item's ID.", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/UpdateTodoItemPriorityModel" - } - ], - "description": "Represents the model for updating the priority of a Todo item." - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - } - } - }, - "/api/items/find": { - "get": { - "tags": [ - "TodoApp" - ], - "operationId": "FindTodo", - "parameters": [ - { - "name": "Text", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "IsCompleted", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoListViewModel" - } - } - } - } - } - } - }, - "/api/items/getAfter": { - "get": { - "tags": [ - "TodoApp" - ], - "operationId": "GetAfterDate", - "parameters": [ - { - "name": "value", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoListViewModel" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "CreateTodoItemModel": { - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "Gets or sets the text of the Todo item." - } - }, - "additionalProperties": false, - "description": "Represents the model for creating a new Todo item." - }, - "CreatedTodoItemModel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the ID of the created Todo item." - } - }, - "additionalProperties": false, - "description": "Represents the model for a created Todo item." - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": { } - }, - "TodoItemModel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the ID of the Todo item." - }, - "text": { - "type": "string", - "description": "Gets or sets the text of the Todo item." - }, - "createdAt": { - "type": "string", - "description": "Gets or sets the date and time the item was created.", - "format": "date-time" - }, - "completedAt": { - "type": "string", - "description": "Gets or sets the date and time the item was completed.", - "format": "date-time", - "nullable": true - }, - "lastUpdated": { - "type": "string", - "description": "Gets or sets the date and time the Todo item was last updated.", - "format": "date-time" - }, - "priority": { - "allOf": [ - { - "$ref": "#/components/schemas/TodoPriority" - } - ], - "description": "Gets or sets the optional priority of the Todo item.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Represents a Todo item." - }, - "TodoListViewModel": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TodoItemModel" - }, - "description": "Gets or sets the Todo item(s)." - } - }, - "additionalProperties": false, - "description": "Represents a collection of Todo items." - }, - "TodoPriority": { - "enum": [ - "Normal", - "Low", - "High" - ], - "type": "string", - "description": "The priority levels for a Todo item." - }, - "UpdateTodoItemPriorityModel": { - "type": "object", - "properties": { - "priority": { - "allOf": [ - { - "$ref": "#/components/schemas/TodoPriority" - } - ], - "description": "Gets or sets the new priority of the Todo item." - } - }, - "additionalProperties": false, - "description": "Represents the model for updating the priority of a Todo item." - } - } - }, - "tags": [ - { - "name": "TodoApp" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt deleted file mode 100644 index 7f373c459d..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=TopLevelSwaggerDoc.Program_swaggerRequestUri=.verified.txt +++ /dev/null @@ -1,9 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "1" - }, - "paths": { }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 48d906e2bc..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Aot.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,87 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Native AoT API V1", - "description": "A sample API for testing Swashbuckle with native AoT", - "termsOfService": "http://tempuri.org/terms", - "version": "v1" - }, - "paths": { - "/todos": { - "get": { - "tags": [ - "WebApi.Aot" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Todo" - } - } - } - } - } - } - } - }, - "/todos/{id}": { - "get": { - "tags": [ - "WebApi.Aot" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "Todo": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string", - "nullable": true - }, - "dueBy": { - "type": "string", - "format": "date", - "nullable": true - }, - "isComplete": { - "type": "boolean" - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "WebApi.Aot" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt b/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt deleted file mode 100644 index 6e9b065305..0000000000 --- a/test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/9_0/VerifyTests.Swagger_IsValidJson_No_Startup_entryPointType=WebApi.Program_swaggerRequestUri=v1.verified.txt +++ /dev/null @@ -1,1108 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "WebApi", - "version": "v1" - }, - "paths": { - "/annotations/fruit/{id}": { - "post": { - "tags": [ - "Annotations" - ], - "summary": "CreateFruit", - "description": "Create a fruit", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the fruit that will be created", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Description for Body", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fruit" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Description for response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fruit" - } - } - } - } - } - } - }, - "/annotations/singleForm": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/PersonAnnotated" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/PersonAnnotated" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/multipleForms": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "$ref": "#/components/schemas/AddressAnnotated" - } - ] - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "$ref": "#/components/schemas/AddressAnnotated" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromFileAndString": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file", - "tags" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "Description for File", - "format": "binary" - }, - "tags": { - "type": "string" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromFileAndEnum": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "dateTimeKind", - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "dateTimeKind": { - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/IFromObjectAndString": { - "post": { - "tags": [ - "Annotations" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonAnnotated" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/annotations/AsParameters": { - "get": { - "tags": [ - "Annotations" - ], - "parameters": [ - { - "name": "paramOne", - "in": "query", - "description": "Description", - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paramTwo", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paramThree", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "paramFour", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "paramFive", - "in": "query", - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "paramSix", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date" - } - }, - { - "name": "paramSeven", - "in": "query", - "schema": { - "type": "string", - "format": "time" - } - }, - { - "name": "paramEight", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "time" - } - }, - { - "name": "paramNine", - "in": "query", - "schema": { - "$ref": "#/components/schemas/DateTimeKind" - } - }, - { - "name": "paramTen", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/DateTimeKind" - } - }, - { - "name": "paramEleven", - "in": "query", - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "paramTwelve", - "in": "query", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsParametersRecord" - } - } - } - } - } - } - }, - "/TypeWithTryParse/{tryParse}": { - "get": { - "tags": [ - "WebApi" - ], - "parameters": [ - { - "name": "tryParse", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/weatherforecast": { - "get": { - "tags": [ - "WithOpenApi" - ], - "operationId": "GetWeatherForecast", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeatherForecast" - } - } - } - } - } - } - } - }, - "/WithOpenApi/multipleForms": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "$ref": "#/components/schemas/Address" - } - ] - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "$ref": "#/components/schemas/Address" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFile": { - "post": { - "tags": [ - "WithOpenApi" - ], - "parameters": [ - { - "name": "queryParameter", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileCollection": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "collection" - ], - "type": "object", - "properties": { - "collection": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - } - }, - "encoding": { - "collection": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromBody": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationCustomExchangeRatesDto" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileAndString": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file", - "tags" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "tags": { - "type": "string" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromFileAndEnum": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "dateTimeKind", - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "dateTimeKind": { - "$ref": "#/components/schemas/DateTimeKind" - } - } - }, - "encoding": { - "file": { - "style": "form" - }, - "dateTimeKind": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/WithOpenApi/IFromObjectAndString": { - "post": { - "tags": [ - "WithOpenApi" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Person" - }, - { - "required": [ - "tags" - ], - "type": "object", - "properties": { - "tags": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "tags": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/XmlComments/Car/{id}": { - "get": { - "tags": [ - "Xml" - ], - "summary": "Returns a specific product", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The product id", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - }, - "example": 111 - } - ], - "responses": { - "200": { - "description": "A Product Id", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Address": { - "type": "object", - "properties": { - "street": { - "type": "string", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "zipCode": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AddressAnnotated": { - "type": "object", - "properties": { - "street": { - "type": "string", - "description": "Description for Street", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "zipCode": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AsParametersRecord": { - "type": "object", - "properties": { - "paramOne": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "paramTwo": { - "type": "string", - "format": "uuid" - }, - "paramThree": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "paramFour": { - "type": "string", - "format": "date-time" - }, - "paramFive": { - "type": "string", - "format": "date", - "nullable": true - }, - "paramSix": { - "type": "string", - "format": "date" - }, - "paramSeven": { - "type": "string", - "format": "time", - "nullable": true - }, - "paramEight": { - "type": "string", - "format": "time" - }, - "paramNine": { - "$ref": "#/components/schemas/DateTimeKind" - }, - "paramTen": { - "$ref": "#/components/schemas/DateTimeKind" - }, - "paramEleven": { - "type": "number", - "format": "double", - "nullable": true - }, - "paramTwelve": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "CurrenciesRate": { - "required": [ - "currencyFrom", - "currencyTo" - ], - "type": "object", - "properties": { - "currencyFrom": { - "type": "string", - "description": "Currency From", - "nullable": true - }, - "currencyTo": { - "type": "string", - "nullable": true - }, - "rate": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "DateTimeKind": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "Fruit": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Description for Schema" - }, - "OrganizationCustomExchangeRatesDto": { - "required": [ - "currenciesRates" - ], - "type": "object", - "properties": { - "currenciesRates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CurrenciesRate" - }, - "nullable": true - }, - "isUpdated": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "Person": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PersonAnnotated": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "description": "Description for FirstName", - "nullable": true - }, - "lastName": { - "type": "string", - "description": "Description for LastName", - "nullable": true - } - }, - "additionalProperties": false - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Uniquely identifies the product", - "format": "int32" - }, - "description": { - "type": "string", - "description": "Describes the product", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Represents a product" - }, - "WeatherForecast": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date" - }, - "temperatureC": { - "type": "integer", - "format": "int32" - }, - "summary": { - "type": "string", - "nullable": true - }, - "temperatureF": { - "type": "integer", - "format": "int32", - "readOnly": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Annotations" - }, - { - "name": "WebApi" - }, - { - "name": "WithOpenApi" - }, - { - "name": "Xml" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGenerator/SwaggerGeneratorTests.cs b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGenerator/SwaggerGeneratorTests.cs index 69b88d73f5..1757ff6ba9 100644 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGenerator/SwaggerGeneratorTests.cs +++ b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGenerator/SwaggerGeneratorTests.cs @@ -208,7 +208,11 @@ public void GetSwagger_GenerateProducesSchemas_ForProvidedOpenApiOperation() { ["200"] = new OpenApiResponse() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -264,7 +268,11 @@ public void GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationAndApp OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -2316,7 +2324,11 @@ public void GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSe OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -2381,7 +2393,11 @@ public void GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIF OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -2443,7 +2459,11 @@ public void GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIF OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -2507,7 +2527,11 @@ public void GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSt OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -2567,7 +2591,11 @@ public void GetSwagger_OpenApiOperationWithRawContent_IsHandled() { RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { { "text/plain", new OpenApiMediaType() } } diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/VerifyTests.cs b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/VerifyTests.cs index 913f5d677f..9ede1c38c8 100644 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/VerifyTests.cs +++ b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/VerifyTests.cs @@ -141,7 +141,11 @@ public async Task ActionWithProducesAttributeAndProvidedOpenApiOperation() { ["200"] = new OpenApiResponse() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -192,7 +196,11 @@ public async Task ActionWithConsumesAttributeAndProvidedOpenApiOperation() OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -1423,7 +1431,11 @@ public async Task GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperation OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -1480,7 +1492,11 @@ public async Task GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperation OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -1531,7 +1547,11 @@ public async Task GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperation OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } @@ -1582,7 +1602,11 @@ public async Task GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperation OperationId = "OperationIdSetInMetadata", RequestBody = new OpenApiRequestBody() { - Content = new Dictionary() +#if NET11_0_OR_GREATER + Content = new Dictionary +#else + Content = new Dictionary +#endif { ["application/someMediaType"] = new OpenApiMediaType() } diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsRequestBodyFilterTests.cs b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsRequestBodyFilterTests.cs index 0c141fd88d..b043fab888 100644 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsRequestBodyFilterTests.cs +++ b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/XmlComments/XmlCommentsRequestBodyFilterTests.cs @@ -14,7 +14,11 @@ public void Apply_SetsDescriptionAndExample_FromActionParamTag() { var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = JsonSchemaTypes.String } } } @@ -41,7 +45,11 @@ public void Apply_SetsDescriptionAndExample_FromUnderlyingGenericTypeActionParam { var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = JsonSchemaTypes.String } } } @@ -68,7 +76,11 @@ public void Apply_SetsDescriptionAndExample_FromPropertySummaryAndExampleTags() { var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = JsonSchemaTypes.String } } } @@ -92,7 +104,11 @@ public void Apply_SetsDescriptionAndExample_FromUriTypePropertySummaryAndExample { var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = JsonSchemaTypes.String } } } @@ -116,7 +132,11 @@ public void Apply_SetsDescription_ForParameterFromBody() { var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["application/json"] = new OpenApiMediaType { Schema = new OpenApiSchema { Type = JsonSchemaTypes.String } } } @@ -144,7 +164,11 @@ public void Apply_SetsDescription_ForParameterFromForm() var requestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { ["multipart/form-data"] = new OpenApiMediaType { diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasFileResult.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasFileResult.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasFileResult.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasFileResult.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasProducesAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasProducesAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHasProducesAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHasProducesAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithCustomDataTypeQueryParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithCustomDataTypeQueryParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithCustomDataTypeQueryParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithCustomDataTypeQueryParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredMember.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredMember.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredMember.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredMember.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasTags.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasTags.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.EndpointMetadataHasTags.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.EndpointMetadataHasTags.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.TagSelectorIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.TagSelectorIsSpecified.verified.txt similarity index 100% rename from test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/8_0/VerifyTests.TagSelectorIsSpecified.verified.txt rename to test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/11_0/VerifyTests.TagSelectorIsSpecified.verified.txt diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt deleted file mode 100644 index 6d14c6201c..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Body.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "type": "string" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt deleted file mode 100644 index bc6ffc3f3f..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasConsumesAttribute_bindingSourceId=Form.verified.txt +++ /dev/null @@ -1,46 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "type": "object", - "properties": { - "param": { - "type": "string" - } - } - }, - "encoding": { - "param": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasFileResult.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasFileResult.verified.txt deleted file mode 100644 index 3273311954..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasFileResult.verified.txt +++ /dev/null @@ -1,35 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt deleted file mode 100644 index 5ec4767ac3..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasObsoleteAttribute.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - }, - "deprecated": true - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasProducesAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasProducesAttribute.verified.txt deleted file mode 100644 index 919cb44f3b..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHasProducesAttribute.verified.txt +++ /dev/null @@ -1,35 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/someMediaType": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt deleted file mode 100644 index 0ac5eeddeb..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeButNotWithIFormFile.verified.txt +++ /dev/null @@ -1,44 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param1", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "param2", - "in": "query", - "schema": { - "type": "string", - "format": "binary" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt deleted file mode 100644 index 09943db9a0..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionHavingFromFormAttributeWithSwaggerIgnore.verified.txt +++ /dev/null @@ -1,46 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "NotIgnoredString": { - "type": "string" - } - } - }, - "encoding": { - "NotIgnoredString": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt deleted file mode 100644 index c4978dc754..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasBindNeverAttribute.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt deleted file mode 100644 index c4978dc754..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionParameterHasSwaggerIgnoreAttribute.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt deleted file mode 100644 index 0477b2747b..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithConsumesAttributeAndProvidedOpenApiOperation.verified.txt +++ /dev/null @@ -1,38 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "$ref": "#/components/schemas/TestDto" - } - } - } - }, - "responses": { } - } - } - }, - "components": { - "schemas": { - "TestDto": { - "type": "object", - "properties": { - "Prop1": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt deleted file mode 100644 index 564eaef913..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithEndpointNameMetadata.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "operationId": "SomeEndpointName", - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt deleted file mode 100644 index 215b43fba8..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithParameterAndProvidedOpenApiOperation.verified.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "parameters": [ - { - "name": "ParameterInMetadata", - "schema": { - "type": "string" - } - } - ], - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt deleted file mode 100644 index 5701dd9909..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProducesAttributeAndProvidedOpenApiOperation.verified.txt +++ /dev/null @@ -1,40 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "responses": { - "200": { - "description": null, - "content": { - "application/someMediaType": { - "schema": { - "$ref": "#/components/schemas/TestDto" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "TestDto": { - "type": "object", - "properties": { - "Prop1": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt deleted file mode 100644 index f9809c47a5..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithProvidedOpenApiMetadata.verified.txt +++ /dev/null @@ -1,21 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "parameters": [ - { - "name": "ParameterInMetadata" - } - ], - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt deleted file mode 100644 index b6f6dc6fe7..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt deleted file mode 100644 index b6f6dc6fe7..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredBodyParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredMember.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredMember.verified.txt deleted file mode 100644 index 4b47d6bf47..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredMember.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt deleted file mode 100644 index 4b47d6bf47..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithBindRequiredAttribute.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt deleted file mode 100644 index 4b47d6bf47..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRequiredQueryParameter_action=ActionWithParameterWithRequiredAttribute.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt deleted file mode 100644 index ab92669e55..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithReturnValueAndSupportedResponseTypes.verified.txt +++ /dev/null @@ -1,44 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "422": { - "description": "Unprocessable Content" - }, - "default": { - "description": "Error" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt deleted file mode 100644 index 78e049e122..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionWithRouteNameMetadata.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "operationId": "SomeRouteName", - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt deleted file mode 100644 index 6624ddf8a3..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAcceptFromHeaderParameter.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt deleted file mode 100644 index 6624ddf8a3..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithAuthorizationFromHeaderParameter.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt deleted file mode 100644 index 6624ddf8a3..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ActionsWithIllegalHeaderParameters_action=ActionWithContentTypeFromHeaderParameter.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt deleted file mode 100644 index ac07216149..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiDescriptionsWithMatchingGroupName.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - }, - "get": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt deleted file mode 100644 index 42b3ff16fb..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterDescriptionForBodyIsRequired.verified.txt +++ /dev/null @@ -1,31 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Foo" - ], - "requestBody": { - "content": { }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Foo" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt deleted file mode 100644 index 9a842b7172..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterHasNoCorrespondingActionParameter.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt deleted file mode 100644 index 9a842b7172..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParameterIsBoundToPath.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt deleted file mode 100644 index 5fb54c13b8..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreBoundToForm.verified.txt +++ /dev/null @@ -1,53 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "param1": { - "type": "string" - }, - "param2": { - "type": "integer", - "format": "int32" - } - } - }, - "encoding": { - "param1": { - "style": "form" - }, - "param2": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt deleted file mode 100644 index c69a69d8a5..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Header.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt deleted file mode 100644 index 9a842b7172..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Path.verified.txt +++ /dev/null @@ -1,37 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt deleted file mode 100644 index 8730d69c92..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=Query.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt deleted file mode 100644 index 8730d69c92..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ApiParametersThatAreNotBoundToBodyOrForm_bindingSourceId=null.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt deleted file mode 100644 index c4978dc754..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.ConflictingActionsResolverIsSpecified.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt deleted file mode 100644 index 1240f3ab27..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasDescriptionAttribute.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "description": "A Test Description", - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt deleted file mode 100644 index 63a367e531..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasSummaryAttribute.verified.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "summary": "A Test Summary", - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasTags.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasTags.verified.txt deleted file mode 100644 index 22721ecaf5..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.EndpointMetadataHasTags.verified.txt +++ /dev/null @@ -1,35 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Some", - "Tags", - "Here" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Some" - }, - { - "name": "Tags" - }, - { - "name": "Here" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt deleted file mode 100644 index aa86c2bf33..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.verified.txt +++ /dev/null @@ -1,125 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "FakeWithInheritance" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MostDerivedClass" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - }, - "get": { - "tags": [ - "FakeWithInheritance" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/MostDerivedClass" - } - ] - } - } - } - } - } - } - } - }, - "/resourceB": { - "get": { - "tags": [ - "FakeWithInheritance" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DerivedClass" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BaseClass": { - "type": "object", - "properties": { - "BaseProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DerivedClass": { - "type": "object", - "properties": { - "BaseProperty": { - "type": "string", - "nullable": true - }, - "DerivedProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MostDerivedClass": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseClass" - } - ], - "properties": { - "DerivedProperty": { - "type": "string", - "nullable": true - }, - "MoreDerivedProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "FakeWithInheritance" - } - ] -} diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt deleted file mode 100644 index 52ca5ca4dc..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.verified.txt +++ /dev/null @@ -1,132 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "FakeWithInheritance" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MostDerivedClass" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - }, - "get": { - "tags": [ - "FakeWithInheritance" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/DerivedClass" - }, - { - "$ref": "#/components/schemas/MostDerivedClass" - } - ] - } - } - } - } - } - } - } - }, - "/resourceB": { - "get": { - "tags": [ - "FakeWithInheritance" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/DerivedClass" - }, - { - "$ref": "#/components/schemas/MostDerivedClass" - } - ] - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "BaseClass": { - "type": "object", - "properties": { - "BaseProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DerivedClass": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BaseClass" - } - ], - "properties": { - "DerivedProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MostDerivedClass": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/DerivedClass" - } - ], - "properties": { - "MoreDerivedProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "FakeWithInheritance" - } - ] -} diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt deleted file mode 100644 index 66ef5af646..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt +++ /dev/null @@ -1,65 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "EnumWithDefault", - "in": "query", - "description": "

Members:

  • Value2 - 2
  • Value4 - 4
  • Value8 - 8
", - "schema": { - "$ref": "#/components/schemas/IntEnum" - } - }, - { - "name": "EnumArrayWithDefault", - "in": "query", - "description": "

Members:

  • Value2 - 2
  • Value4 - 4
  • Value8 - 8
", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntEnum" - }, - "description": "

Members:

  • Value2 - 2
  • Value4 - 4
  • Value8 - 8
", - "default": [ - 4 - ] - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "IntEnum": { - "enum": [ - 2, - 4, - 8 - ], - "type": "integer", - "description": "

Members:

  • Value2 - 2
  • Value4 - 4
  • Value8 - 8
", - "format": "int32" - } - } - }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt deleted file mode 100644 index 0b8be7e8df..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFile.verified.txt +++ /dev/null @@ -1,36 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "type": "object", - "properties": { - "param": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "param": { - "style": "form" - } - } - } - } - }, - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt deleted file mode 100644 index 13fdf02051..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithIFormFileCollection.verified.txt +++ /dev/null @@ -1,39 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "type": "object", - "properties": { - "param": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - } - } - }, - "encoding": { - "param": { - "style": "form" - } - } - } - } - }, - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt deleted file mode 100644 index 1a5220d12f..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt +++ /dev/null @@ -1,73 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/TestDto" - }, - { - "$ref": "#/components/schemas/TypeWithDefaultAttributeOnEnum" - } - ] - } - } - } - }, - "responses": { } - } - } - }, - "components": { - "schemas": { - "IntEnum": { - "enum": [ - 2, - 4, - 8 - ], - "type": "integer", - "format": "int32" - }, - "TestDto": { - "type": "object", - "properties": { - "Prop1": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "TypeWithDefaultAttributeOnEnum": { - "type": "object", - "properties": { - "EnumWithDefault": { - "$ref": "#/components/schemas/IntEnum" - }, - "EnumArrayWithDefault": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntEnum" - }, - "default": [ - 4 - ], - "nullable": true - } - }, - "additionalProperties": false - } - } - } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt deleted file mode 100644 index fb4a0d9b0d..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithStringFromForm.verified.txt +++ /dev/null @@ -1,35 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "operationId": "OperationIdSetInMetadata", - "requestBody": { - "content": { - "application/someMediaType": { - "schema": { - "type": "object", - "properties": { - "param": { - "type": "string" - } - } - }, - "encoding": { - "param": { - "style": "form" - } - } - } - } - }, - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt deleted file mode 100644 index 3f7e0fca72..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject.verified.txt +++ /dev/null @@ -1,49 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/SwaggerIngoreAnnotatedType" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "SwaggerIngoreAnnotatedType": { - "type": "object", - "properties": { - "NotIgnoredString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt deleted file mode 100644 index 09cd6845a7..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_FromFormObject_AndString.verified.txt +++ /dev/null @@ -1,66 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SwaggerIngoreAnnotatedType" - }, - { - "type": "object", - "properties": { - "param2": { - "type": "string" - } - } - } - ] - }, - "encoding": { - "param2": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "SwaggerIngoreAnnotatedType": { - "type": "object", - "properties": { - "NotIgnoredString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt deleted file mode 100644 index dcb2bf290f..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.GetSwagger_Works_As_Expected_When_TypeIsEnum_AndModelMetadataTypeIsString.verified.txt +++ /dev/null @@ -1,48 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "Fake" - ], - "parameters": [ - { - "name": "param1", - "in": "query", - "schema": { - "$ref": "#/components/schemas/IntEnum" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "IntEnum": { - "enum": [ - 2, - 4, - 8 - ], - "type": "integer", - "format": "int32" - } - } - }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt deleted file mode 100644 index 7e8db45714..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAcceptFromHeaderParameter.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "operationId": "OperationIdSetInMetadata", - "parameters": [ - { - "name": "accept" - }, - { - "name": "param", - "schema": { - "type": "string" - } - } - ], - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt deleted file mode 100644 index ad0d5948d7..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "operationId": "OperationIdSetInMetadata", - "parameters": [ - { - "name": "authorization" - }, - { - "name": "param", - "schema": { - "type": "string" - } - } - ], - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt deleted file mode 100644 index 53d0e30a9a..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.IllegalHeaderForOperation_action=ActionWithContentTypeFromHeaderParameter.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "get": { - "operationId": "OperationIdSetInMetadata", - "parameters": [ - { - "name": "Content-Type" - }, - { - "name": "param", - "schema": { - "type": "string" - } - } - ], - "responses": { } - } - } - }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt deleted file mode 100644 index 0e2c5aacab..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.OperationHasSwaggerIgnoreAttribute.verified.txt +++ /dev/null @@ -1,9 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { }, - "components": { } -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt deleted file mode 100644 index 48ec45c64a..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.SortKeySelectorIsSpecified.verified.txt +++ /dev/null @@ -1,51 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource1": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/resource2": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/resource3": { - "post": { - "tags": [ - "Fake" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "Fake" - } - ] -} \ No newline at end of file diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.TagSelectorIsSpecified.verified.txt b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.TagSelectorIsSpecified.verified.txt deleted file mode 100644 index a007011e63..0000000000 --- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/9_0/VerifyTests.TagSelectorIsSpecified.verified.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "Test API", - "version": "V1" - }, - "paths": { - "/resource": { - "post": { - "tags": [ - "resource" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { }, - "tags": [ - { - "name": "resource" - } - ] -} \ No newline at end of file diff --git a/test/WebSites/Basic/Controllers/CrudActionsController.cs b/test/WebSites/Basic/Controllers/CrudActionsController.cs index a143e53458..7d97893968 100644 --- a/test/WebSites/Basic/Controllers/CrudActionsController.cs +++ b/test/WebSites/Basic/Controllers/CrudActionsController.cs @@ -28,17 +28,10 @@ public class CrudActionsController /// /// [HttpPost(Name = "CreateProduct")] -#if NET10_0_OR_GREATER public Ok Create([FromBody, Required] Product product) { return TypedResults.Ok(product); } -#else - public Product Create([FromBody, Required] Product product) - { - return product; - } -#endif /// Get all products /// diff --git a/test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net8.0.json b/test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net11.0.json similarity index 100% rename from test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net8.0.json rename to test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net11.0.json diff --git a/test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net9.0.json b/test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net9.0.json deleted file mode 100644 index 91a88cd8d1..0000000000 --- a/test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net9.0.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CliExample", - "version": "1.0" - }, - "servers": [ - { - "url": "http://localhost:51071" - } - ], - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net8.0.json b/test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net11.0.json similarity index 100% rename from test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net8.0.json rename to test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net11.0.json diff --git a/test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net9.0.json b/test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net9.0.json deleted file mode 100644 index eeda72e5e4..0000000000 --- a/test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net9.0.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "CliExampleWithFactory", - "version": "1.0" - }, - "servers": [ - { - "url": "http://localhost:57556/" - } - ], - "paths": { - "/products": { - "get": { - "tags": [ - "Products" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - } - }, - "tags": [ - { - "name": "Products" - } - ] -} \ No newline at end of file diff --git a/test/WebSites/NswagClientExample/NswagClientExample.csproj b/test/WebSites/NswagClientExample/NswagClientExample.csproj index 4f7a70b87d..54a94aee3f 100644 --- a/test/WebSites/NswagClientExample/NswagClientExample.csproj +++ b/test/WebSites/NswagClientExample/NswagClientExample.csproj @@ -3,9 +3,11 @@ $(DefaultTargetFrameworks) $([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration.ToLower())_$(TargetFramework)')) - <_NSwagTool>$(NSwagExe_Net80) - <_NSwagTool Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">$(NSwagExe_Net90) - <_NSwagTool Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">$(NSwagExe_Net100) + <_NSwagTool>$(NSwagExe_Net100) + + diff --git a/test/WebSites/NswagClientExample/swagger_net8.0.json b/test/WebSites/NswagClientExample/swagger_net11.0.json similarity index 100% rename from test/WebSites/NswagClientExample/swagger_net8.0.json rename to test/WebSites/NswagClientExample/swagger_net11.0.json diff --git a/test/WebSites/NswagClientExample/swagger_net9.0.json b/test/WebSites/NswagClientExample/swagger_net9.0.json deleted file mode 100644 index cc22ed49f6..0000000000 --- a/test/WebSites/NswagClientExample/swagger_net9.0.json +++ /dev/null @@ -1,479 +0,0 @@ -{ - "openapi": "3.0.4", - "info": { - "title": "NswagClientExample", - "version": "1.0" - }, - "servers": [ - { - "url": "http://example.com" - } - ], - "paths": { - "/Animals": { - "post": { - "tags": [ - "Animals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "$ref": "#/components/schemas/Cat" - }, - { - "$ref": "#/components/schemas/Dog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/SecondLevel": { - "post": { - "tags": [ - "SecondLevel" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SubSubType" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/SystemTextJsonAnimals": { - "post": { - "tags": [ - "SystemTextJsonAnimals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/SystemTextJsonDefaultDiscriminatorAnimals": { - "post": { - "tags": [ - "SystemTextJsonDefaultDiscriminatorAnimals" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - }, - "text/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - }, - "application/*+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat" - }, - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - }, - "components": { - "schemas": { - "Animal": { - "required": [ - "animalType" - ], - "type": "object", - "properties": { - "animalType": { - "$ref": "#/components/schemas/AnimalType" - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "animalType", - "mapping": { - "Cat": "#/components/schemas/Cat", - "Dog": "#/components/schemas/Dog" - } - } - }, - "AnimalType": { - "enum": [ - "Cat", - "Dog" - ], - "type": "string" - }, - "BaseType": { - "required": [ - "discriminator" - ], - "type": "object", - "properties": { - "discriminator": { - "type": "string" - }, - "property": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "discriminator", - "mapping": { - "SubSubType": "#/components/schemas/SubSubType" - } - } - }, - "Cat": { - "allOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "Dog": { - "allOf": [ - { - "$ref": "#/components/schemas/Animal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SubSubType": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseType" - }, - { - "type": "object", - "properties": { - "property2": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonAnimal": { - "required": [ - "animalType" - ], - "type": "object", - "properties": { - "animalType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "animalType", - "mapping": { - "Cat": "#/components/schemas/SystemTextJsonCat", - "Dog": "#/components/schemas/SystemTextJsonDog" - } - } - }, - "SystemTextJsonCat": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDefaultDiscriminatorAnimal": { - "required": [ - "$type" - ], - "type": "object", - "properties": { - "$type": { - "type": "string" - }, - "animalType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "discriminator": { - "propertyName": "$type", - "mapping": { - "Cat": "#/components/schemas/SystemTextJsonDefaultDiscriminatorCat", - "Dog": "#/components/schemas/SystemTextJsonDefaultDiscriminatorDog" - } - } - }, - "SystemTextJsonDefaultDiscriminatorCat": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "type": "object", - "properties": { - "catSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDefaultDiscriminatorDog": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonDefaultDiscriminatorAnimal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - }, - "SystemTextJsonDog": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemTextJsonAnimal" - }, - { - "type": "object", - "properties": { - "dogSpecificProperty": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - } - ] - } - } - }, - "tags": [ - { - "name": "Animals" - }, - { - "name": "SecondLevel" - }, - { - "name": "SystemTextJsonAnimals" - }, - { - "name": "SystemTextJsonDefaultDiscriminatorAnimals" - } - ] -} \ No newline at end of file diff --git a/test/WebSites/OAuth2Integration/OAuth2Integration.csproj b/test/WebSites/OAuth2Integration/OAuth2Integration.csproj index c67a47be49..cd8c67bf1b 100644 --- a/test/WebSites/OAuth2Integration/OAuth2Integration.csproj +++ b/test/WebSites/OAuth2Integration/OAuth2Integration.csproj @@ -13,16 +13,12 @@ - - - - - - - - + + + + diff --git a/test/WebSites/TestFirst.IntegrationTests/CreateUserTests.cs b/test/WebSites/TestFirst.IntegrationTests/CreateUserTests.cs index 8daf39da24..1c2757d221 100644 --- a/test/WebSites/TestFirst.IntegrationTests/CreateUserTests.cs +++ b/test/WebSites/TestFirst.IntegrationTests/CreateUserTests.cs @@ -20,7 +20,11 @@ public CreateUserTests( OperationId = "CreateUser", RequestBody = new OpenApiRequestBody { +#if NET11_0_OR_GREATER + Content = new Dictionary +#else Content = new Dictionary +#endif { [ "application/json" ] = new OpenApiMediaType { diff --git a/test/WebSites/TodoApp/TodoApp.csproj b/test/WebSites/TodoApp/TodoApp.csproj index 0258745bf0..3e8f4de911 100644 --- a/test/WebSites/TodoApp/TodoApp.csproj +++ b/test/WebSites/TodoApp/TodoApp.csproj @@ -13,13 +13,10 @@ - - - - - - + + + diff --git a/test/WebSites/WebApi/EndPoints/XmlCommentsEndpoints.cs b/test/WebSites/WebApi/EndPoints/XmlCommentsEndpoints.cs index 0e35fca1cd..dda471f50a 100644 --- a/test/WebSites/WebApi/EndPoints/XmlCommentsEndpoints.cs +++ b/test/WebSites/WebApi/EndPoints/XmlCommentsEndpoints.cs @@ -1,6 +1,4 @@ -#if NET10_0_OR_GREATER -using Microsoft.AspNetCore.Mvc; -#endif +using Microsoft.AspNetCore.Mvc; namespace WebApi.EndPoints; @@ -17,12 +15,9 @@ public static IEndpointRouteBuilder MapXmlCommentsEndpoints(this IEndpointRouteB var group = app.MapGroup("/XmlComments").WithTags("Xml"); group.MapGet("/Car/{id}", GetProduct); - -#if NET10_0_OR_GREATER group.MapGet("Car", GetProductAsParameters); group.MapGet("CarWithProduces",GetProductWithProduces); group.MapGet("CarWithProducesDefaultResponseType",GetProductProducesDefaultResponseType); -#endif return app; } @@ -34,7 +29,6 @@ public static IEndpointRouteBuilder MapXmlCommentsEndpoints(this IEndpointRouteB private static Product GetProduct(int id) => new() { Id = id, Description = "A product" }; -#if NET10_0_OR_GREATER /// /// Returns a specific product using asParameters record /// @@ -55,7 +49,6 @@ private static Product GetProductWithProduces(int id) [ProducesDefaultResponseType(typeof(Product), Description = "A Product")] private static Product GetProductProducesDefaultResponseType(int id) => new() { Id = id, Description = "A product" }; -#endif } ///