From cda34c769441e23fc1683d73c84c43d44dfe8d7b Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 7 Feb 2024 18:54:02 -0500 Subject: [PATCH 01/36] openapi: include ETag/Location headers --- .../JsonApiOperationDocumentationFilter.cs | 37 ++++++++++++++++++- .../DocComments/DocCommentsTests.cs | 25 +++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 34bf14a222..13f204c09c 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -7,6 +7,7 @@ using JsonApiDotNetCore.Resources; using JsonApiDotNetCore.Resources.Annotations; using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.Net.Http.Headers; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; @@ -162,6 +163,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationSummary(operation, $"Retrieves a collection of {resourceType} without returning them."); SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } else { @@ -169,6 +171,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetResponseDescription(operation.Responses, HttpStatusCode.OK, $"Successfully returns the found {resourceType}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } AddQueryStringParameters(operation, false); @@ -183,11 +186,13 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationSummary(operation, $"Retrieves an individual {singularName} by its identifier without returning it."); SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } else { SetOperationSummary(operation, $"Retrieves an individual {singularName} by its identifier."); SetResponseDescription(operation.Responses, HttpStatusCode.OK, $"Successfully returns the found {singularName}."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularName} to retrieve."); @@ -207,6 +212,7 @@ private void ApplyPostResource(OpenApiOperation operation, ResourceType resource SetResponseDescription(operation.Responses, HttpStatusCode.Created, $"The {singularName} was successfully created, which resulted in additional changes. The newly created {singularName} is returned."); + SetResponseHeaderLocation(operation.Responses, HttpStatusCode.Created); SetResponseDescription(operation.Responses, HttpStatusCode.NoContent, $"The {singularName} was successfully created, which did not result in additional changes."); @@ -271,6 +277,7 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } else { @@ -280,6 +287,7 @@ relationship is HasOneAttribute relationship is HasOneAttribute ? $"Successfully returns the found {rightName}, or null if it was not found." : $"Successfully returns the found {rightName}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {rightName} to retrieve."); @@ -303,6 +311,7 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } else { @@ -313,6 +322,7 @@ relationship is HasOneAttribute relationship is HasOneAttribute ? $"Successfully returns the found {singularRightName} {ident}, or null if it was not found." : $"Successfully returns the found {singularRightName} {ident}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {singularRightName} {ident} to retrieve."); @@ -420,6 +430,31 @@ private static void SetRequestBodyDescription(OpenApiRequestBody requestBody, st } private static void SetResponseDescription(OpenApiResponses responses, HttpStatusCode statusCode, string description) + { + OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + response.Description = XmlCommentsTextHelper.Humanize(description); + } + + private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatusCode statusCode) + { + OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + response.Headers[HeaderNames.ETag] = new OpenApiHeader + { + Description = "ETag identifying the version of the fetched resource.", + Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\""), + }; + } + + private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode) + { + OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + response.Headers[HeaderNames.Location] = new OpenApiHeader + { + Description = "Location of the newly created resource.", + }; + } + + private static OpenApiResponse GetOrCreateResponse(OpenApiResponses responses, HttpStatusCode statusCode) { string responseCode = ((int)statusCode).ToString(); @@ -429,7 +464,7 @@ private static void SetResponseDescription(OpenApiResponses responses, HttpStatu responses.Add(responseCode, response); } - response.Description = XmlCommentsTextHelper.Humanize(description); + return response; } private static void AddQueryStringParameters(OpenApiOperation operation, bool isRelationshipEndpoint) diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index 71fbc68404..0da91cf7b2 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -76,6 +76,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(2); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscrapers, or an empty array if none were found."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -96,6 +98,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(2); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -115,6 +119,7 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(5); responsesElement.Should().HaveProperty("201.description", "The skyscraper was successfully created, which resulted in additional changes. The newly created skyscraper is returned."); + responsesElement.Should().HaveProperty("201.headers.Location.description", "Location of the newly created resource."); responsesElement.Should().HaveProperty("204.description", "The skyscraper was successfully created, which did not result in additional changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid or the request body is missing or malformed."); responsesElement.Should().HaveProperty("409.description", "A resource type in the request body is incompatible."); @@ -142,6 +147,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscraper."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -165,6 +172,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -236,6 +245,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator, or `null` if it was not found."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -259,6 +270,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -284,6 +297,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator identity, or `null` if it was not found."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -307,6 +322,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -355,6 +372,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found spaces, or an empty array if none were found."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -378,6 +397,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -403,6 +424,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found space identities, or an empty array if none were found."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -426,6 +449,8 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); + responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); From 60e31b6eff3cfc3b47e4d49ea1d63a2c86033347 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 7 Feb 2024 19:10:17 -0500 Subject: [PATCH 02/36] Update all open api files --- .../LegacyClient/swagger.g.json | 328 ++++++++++++++++-- .../CamelCase/swagger.g.json | 150 +++++++- .../KebabCase/swagger.g.json | 150 +++++++- .../PascalCase/swagger.g.json | 150 +++++++- .../ModelStateValidationOff/swagger.g.json | 145 +++++++- .../ModelStateValidationOn/swagger.g.json | 145 +++++++- .../ModelStateValidationOff/swagger.g.json | 201 ++++++++++- .../ModelStateValidationOn/swagger.g.json | 201 ++++++++++- .../QueryStrings/swagger.g.json | 178 +++++++++- .../LegacyOpenApiIntegration/swagger.json | 328 ++++++++++++++++-- 10 files changed, 1842 insertions(+), 134 deletions(-) diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index 7736381583..cb97ac4259 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found airplanes, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found airplane.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -861,6 +914,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -905,7 +964,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -950,6 +1015,11 @@ "responses": { "201": { "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1038,6 +1108,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1101,7 +1177,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1279,6 +1361,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1342,7 +1430,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1387,6 +1481,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1450,7 +1550,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1696,6 +1802,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1759,7 +1871,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1804,6 +1922,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1867,7 +1991,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2104,6 +2234,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2148,7 +2284,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2193,6 +2335,11 @@ "responses": { "201": { "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2281,6 +2428,12 @@ "responses": { "200": { "description": "Successfully returns the found flight.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2344,7 +2497,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2522,6 +2681,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2585,7 +2750,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2630,6 +2801,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2693,7 +2870,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2805,6 +2988,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2868,7 +3057,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2913,6 +3108,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2976,7 +3177,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3222,6 +3429,12 @@ "responses": { "200": { "description": "Successfully returns the found passengers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3285,7 +3498,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3330,6 +3549,12 @@ "responses": { "200": { "description": "Successfully returns the found passenger identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3393,7 +3618,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3639,6 +3870,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3702,7 +3939,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3747,6 +3990,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3810,7 +4059,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3913,6 +4168,12 @@ "responses": { "200": { "description": "Successfully returns the found passengers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3957,7 +4218,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -4002,6 +4269,11 @@ "responses": { "201": { "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -4090,6 +4362,12 @@ "responses": { "200": { "description": "Successfully returns the found passenger.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -4153,7 +4431,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index f67656daec..b51a0a43f6 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMembers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The staffMember was successfully created, which resulted in additional changes. The newly created staffMember is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -444,6 +473,12 @@ "responses": { "200": { "description": "Successfully returns the found supermarkets, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -488,7 +523,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -533,6 +574,11 @@ "responses": { "201": { "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -621,6 +667,12 @@ "responses": { "200": { "description": "Successfully returns the found supermarket.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -684,7 +736,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -862,6 +920,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -925,7 +989,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -970,6 +1040,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1033,7 +1109,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1145,6 +1227,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMembers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1208,7 +1296,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1253,6 +1347,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1316,7 +1416,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1562,6 +1668,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1625,7 +1737,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1670,6 +1788,12 @@ "responses": { "200": { "description": "Successfully returns the found staffMember identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1733,7 +1857,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 88f20b6310..0fad4f5241 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-members, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The staff-member was successfully created, which resulted in additional changes. The newly created staff-member is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -444,6 +473,12 @@ "responses": { "200": { "description": "Successfully returns the found supermarkets, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -488,7 +523,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -533,6 +574,11 @@ "responses": { "201": { "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -621,6 +667,12 @@ "responses": { "200": { "description": "Successfully returns the found supermarket.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -684,7 +736,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -862,6 +920,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -925,7 +989,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -970,6 +1040,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1033,7 +1109,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1145,6 +1227,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-members, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1208,7 +1296,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1253,6 +1347,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1316,7 +1416,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1562,6 +1668,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1625,7 +1737,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1670,6 +1788,12 @@ "responses": { "200": { "description": "Successfully returns the found staff-member identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1733,7 +1857,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 6922cbb387..0db7052a6c 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMembers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The StaffMember was successfully created, which resulted in additional changes. The newly created StaffMember is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -444,6 +473,12 @@ "responses": { "200": { "description": "Successfully returns the found Supermarkets, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -488,7 +523,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -533,6 +574,11 @@ "responses": { "201": { "description": "The Supermarket was successfully created, which resulted in additional changes. The newly created Supermarket is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -621,6 +667,12 @@ "responses": { "200": { "description": "Successfully returns the found Supermarket.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -684,7 +736,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -862,6 +920,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -925,7 +989,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -970,6 +1040,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1033,7 +1109,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1145,6 +1227,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMembers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1208,7 +1296,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1253,6 +1347,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1316,7 +1416,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1562,6 +1668,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1625,7 +1737,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1670,6 +1788,12 @@ "responses": { "200": { "description": "Successfully returns the found StaffMember identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1733,7 +1857,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index eef7a522cd..7827c1d9db 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found resources, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found resource.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -870,6 +923,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -933,7 +992,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -978,6 +1043,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1041,7 +1112,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1153,6 +1230,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1216,7 +1299,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1261,6 +1350,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1324,7 +1419,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1570,6 +1671,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1633,7 +1740,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1678,6 +1791,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1741,7 +1860,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 20eb52fdb5..419b84f679 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found resources, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found resource.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -870,6 +923,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -933,7 +992,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -978,6 +1043,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1041,7 +1112,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1153,6 +1230,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1216,7 +1299,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1261,6 +1350,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1324,7 +1419,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1570,6 +1671,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1633,7 +1740,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1678,6 +1791,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1741,7 +1860,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 5b8e57278a..9071c3b3ad 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found resources, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found resource.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -736,6 +789,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -799,7 +858,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -844,6 +909,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -907,7 +978,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1019,6 +1096,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1082,7 +1165,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1127,6 +1216,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1190,7 +1285,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1302,6 +1403,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1365,7 +1472,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1410,6 +1523,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1473,7 +1592,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1585,6 +1710,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1648,7 +1779,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1693,6 +1830,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1756,7 +1899,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2002,6 +2151,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2065,7 +2220,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2110,6 +2271,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2173,7 +2340,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index c9984786b3..186e103a26 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found resources, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found resource.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -736,6 +789,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -799,7 +858,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -844,6 +909,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -907,7 +978,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1019,6 +1096,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1082,7 +1165,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1127,6 +1216,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1190,7 +1285,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1302,6 +1403,12 @@ "responses": { "200": { "description": "Successfully returns the found empty, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1365,7 +1472,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1410,6 +1523,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1473,7 +1592,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1585,6 +1710,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1648,7 +1779,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1693,6 +1830,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1756,7 +1899,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2002,6 +2151,12 @@ "responses": { "200": { "description": "Successfully returns the found empties, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2065,7 +2220,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2110,6 +2271,12 @@ "responses": { "200": { "description": "Successfully returns the found empty identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2173,7 +2340,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index f9c5132ed0..c8972b21db 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found nameValuePairs, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The nameValuePair was successfully created, which resulted in additional changes. The newly created nameValuePair is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found nameValuePair.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found node, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found node identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -727,6 +780,12 @@ "responses": { "200": { "description": "Successfully returns the found nodes, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -771,7 +830,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -816,6 +881,11 @@ "responses": { "201": { "description": "The node was successfully created, which resulted in additional changes. The newly created node is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -904,6 +974,12 @@ "responses": { "200": { "description": "Successfully returns the found node.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -967,7 +1043,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1145,6 +1227,12 @@ "responses": { "200": { "description": "Successfully returns the found nodes, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1208,7 +1296,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1253,6 +1347,12 @@ "responses": { "200": { "description": "Successfully returns the found node identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1316,7 +1416,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1562,6 +1668,12 @@ "responses": { "200": { "description": "Successfully returns the found node, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1625,7 +1737,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1670,6 +1788,12 @@ "responses": { "200": { "description": "Successfully returns the found node identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1733,7 +1857,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1845,6 +1975,12 @@ "responses": { "200": { "description": "Successfully returns the found nameValuePairs, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1908,7 +2044,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1953,6 +2095,12 @@ "responses": { "200": { "description": "Successfully returns the found nameValuePair identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2016,7 +2164,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index 7736381583..cb97ac4259 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -35,6 +35,12 @@ "responses": { "200": { "description": "Successfully returns the found airplanes, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +85,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +136,11 @@ "responses": { "201": { "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +229,12 @@ "responses": { "200": { "description": "Successfully returns the found airplane.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +298,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +482,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +551,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +602,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +671,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -861,6 +914,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -905,7 +964,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -950,6 +1015,11 @@ "responses": { "201": { "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1038,6 +1108,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1101,7 +1177,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1279,6 +1361,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1342,7 +1430,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1387,6 +1481,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1450,7 +1550,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1696,6 +1802,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1759,7 +1871,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1804,6 +1922,12 @@ "responses": { "200": { "description": "Successfully returns the found flight identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1867,7 +1991,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2104,6 +2234,12 @@ "responses": { "200": { "description": "Successfully returns the found flights, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2148,7 +2284,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2193,6 +2335,11 @@ "responses": { "201": { "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2281,6 +2428,12 @@ "responses": { "200": { "description": "Successfully returns the found flight.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2344,7 +2497,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2522,6 +2681,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2585,7 +2750,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2630,6 +2801,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2693,7 +2870,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2805,6 +2988,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2868,7 +3057,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2913,6 +3108,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2976,7 +3177,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3222,6 +3429,12 @@ "responses": { "200": { "description": "Successfully returns the found passengers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3285,7 +3498,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3330,6 +3549,12 @@ "responses": { "200": { "description": "Successfully returns the found passenger identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3393,7 +3618,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3639,6 +3870,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3702,7 +3939,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3747,6 +3990,12 @@ "responses": { "200": { "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3810,7 +4059,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3913,6 +4168,12 @@ "responses": { "200": { "description": "Successfully returns the found passengers, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3957,7 +4218,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -4002,6 +4269,11 @@ "responses": { "201": { "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource." + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -4090,6 +4362,12 @@ "responses": { "200": { "description": "Successfully returns the found passenger.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -4153,7 +4431,13 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." From baa8677d477ac87443062c2f9066cadc24a292a3 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 7 Feb 2024 19:18:02 -0500 Subject: [PATCH 03/36] Make response headers required --- .../JsonApiOperationDocumentationFilter.cs | 2 + .../LegacyClient/swagger.g.json | 56 +++++++++++++++++-- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 13f204c09c..f44021cc30 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -441,6 +441,7 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus response.Headers[HeaderNames.ETag] = new OpenApiHeader { Description = "ETag identifying the version of the fetched resource.", + Required = true, Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\""), }; } @@ -451,6 +452,7 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt response.Headers[HeaderNames.Location] = new OpenApiHeader { Description = "Location of the newly created resource.", + Required = true, }; } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index cb97ac4259..a2e52bf12c 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -917,6 +926,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -968,6 +978,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1017,7 +1028,8 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -1111,6 +1123,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1181,6 +1194,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1364,6 +1378,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1434,6 +1449,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1484,6 +1500,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1554,6 +1571,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1805,6 +1823,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1875,6 +1894,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1925,6 +1945,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1995,6 +2016,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2237,6 +2259,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2288,6 +2311,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2337,7 +2361,8 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -2431,6 +2456,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2501,6 +2527,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2684,6 +2711,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2754,6 +2782,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2804,6 +2833,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2874,6 +2904,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2991,6 +3022,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3061,6 +3093,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3111,6 +3144,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3181,6 +3215,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3432,6 +3467,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3502,6 +3538,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3552,6 +3589,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3622,6 +3660,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3873,6 +3912,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3943,6 +3983,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3993,6 +4034,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4063,6 +4105,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4171,6 +4214,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4222,6 +4266,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4271,7 +4316,8 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -4365,6 +4411,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4435,6 +4482,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } From 07d447732095e1a76291d6c77a1031d1bda7a281 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 7 Feb 2024 19:35:26 -0500 Subject: [PATCH 04/36] Fix coding style --- .../JsonApiDotNetCoreExample.json | 306 ++++++++++++++++-- .../JsonApiOperationDocumentationFilter.cs | 10 +- 2 files changed, 296 insertions(+), 20 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 40ace7117f..9eab13f169 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -35,6 +35,13 @@ "responses": { "200": { "description": "Successfully returns the found people, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -79,7 +86,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -124,6 +138,12 @@ "responses": { "201": { "description": "The person was successfully created, which resulted in additional changes. The newly created person is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource.", + "required": true + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -212,6 +232,13 @@ "responses": { "200": { "description": "Successfully returns the found person.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -275,7 +302,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -453,6 +487,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItems, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -516,7 +557,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -561,6 +609,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -624,7 +679,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -870,6 +932,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItems, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -933,7 +1002,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -978,6 +1054,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1041,7 +1124,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1278,6 +1368,13 @@ "responses": { "200": { "description": "Successfully returns the found tags, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1322,7 +1419,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1367,6 +1471,12 @@ "responses": { "201": { "description": "The tag was successfully created, which resulted in additional changes. The newly created tag is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource.", + "required": true + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1455,6 +1565,13 @@ "responses": { "200": { "description": "Successfully returns the found tag.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1518,7 +1635,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1696,6 +1820,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItems, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1759,7 +1890,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -1804,6 +1942,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -1867,7 +2012,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2104,6 +2256,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItems, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2148,7 +2307,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2193,6 +2359,12 @@ "responses": { "201": { "description": "The todoItem was successfully created, which resulted in additional changes. The newly created todoItem is returned.", + "headers": { + "Location": { + "description": "Location of the newly created resource.", + "required": true + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2281,6 +2453,13 @@ "responses": { "200": { "description": "Successfully returns the found todoItem.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2344,7 +2523,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2522,6 +2708,13 @@ "responses": { "200": { "description": "Successfully returns the found person, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2585,7 +2778,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2630,6 +2830,13 @@ "responses": { "200": { "description": "Successfully returns the found person identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2693,7 +2900,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2805,6 +3019,13 @@ "responses": { "200": { "description": "Successfully returns the found person, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2868,7 +3089,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -2913,6 +3141,13 @@ "responses": { "200": { "description": "Successfully returns the found person identity, or `null` if it was not found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -2976,7 +3211,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3088,6 +3330,13 @@ "responses": { "200": { "description": "Successfully returns the found tags, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3151,7 +3400,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." @@ -3196,6 +3452,13 @@ "responses": { "200": { "description": "Successfully returns the found tag identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + }, "content": { "application/vnd.api+json": { "schema": { @@ -3259,7 +3522,14 @@ ], "responses": { "200": { - "description": "The operation completed successfully." + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } }, "400": { "description": "The query string is invalid." diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index f44021cc30..375b2aecf4 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -171,6 +171,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetResponseDescription(operation.Responses, HttpStatusCode.OK, $"Successfully returns the found {resourceType}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } @@ -212,6 +213,7 @@ private void ApplyPostResource(OpenApiOperation operation, ResourceType resource SetResponseDescription(operation.Responses, HttpStatusCode.Created, $"The {singularName} was successfully created, which resulted in additional changes. The newly created {singularName} is returned."); + SetResponseHeaderLocation(operation.Responses, HttpStatusCode.Created); SetResponseDescription(operation.Responses, HttpStatusCode.NoContent, @@ -287,6 +289,7 @@ relationship is HasOneAttribute relationship is HasOneAttribute ? $"Successfully returns the found {rightName}, or null if it was not found." : $"Successfully returns the found {rightName}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } @@ -322,6 +325,7 @@ relationship is HasOneAttribute relationship is HasOneAttribute ? $"Successfully returns the found {singularRightName} {ident}, or null if it was not found." : $"Successfully returns the found {singularRightName} {ident}, or an empty array if none were found."); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); } @@ -438,21 +442,23 @@ private static void SetResponseDescription(OpenApiResponses responses, HttpStatu private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatusCode statusCode) { OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + response.Headers[HeaderNames.ETag] = new OpenApiHeader { Description = "ETag identifying the version of the fetched resource.", Required = true, - Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\""), + Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") }; } private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode) { OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + response.Headers[HeaderNames.Location] = new OpenApiHeader { Description = "Location of the newly created resource.", - Required = true, + Required = true }; } From 06a4d793e8c69163d150a177abaffc929b33f5de Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 00:04:20 -0500 Subject: [PATCH 05/36] Fix test --- .../CamelCase/swagger.g.json | 26 ++++++++- .../KebabCase/swagger.g.json | 26 ++++++++- .../PascalCase/swagger.g.json | 26 ++++++++- .../ModelStateValidationOff/swagger.g.json | 23 +++++++- .../ModelStateValidationOn/swagger.g.json | 23 +++++++- .../ModelStateValidationOff/swagger.g.json | 31 +++++++++- .../ModelStateValidationOn/swagger.g.json | 31 +++++++++- .../QueryStrings/swagger.g.json | 30 +++++++++- .../LegacyOpenApiIntegration/swagger.json | 56 +++++++++++++++++-- 9 files changed, 256 insertions(+), 16 deletions(-) diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index b51a0a43f6..ea611a9015 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The staffMember was successfully created, which resulted in additional changes. The newly created staffMember is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -476,6 +481,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -527,6 +533,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -576,7 +583,8 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -670,6 +678,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -740,6 +749,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -923,6 +933,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -993,6 +1004,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1043,6 +1055,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1113,6 +1126,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1230,6 +1244,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1300,6 +1315,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1350,6 +1366,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1420,6 +1437,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1671,6 +1689,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1741,6 +1760,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1791,6 +1811,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1861,6 +1882,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 0fad4f5241..bc215c5fcf 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The staff-member was successfully created, which resulted in additional changes. The newly created staff-member is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -476,6 +481,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -527,6 +533,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -576,7 +583,8 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -670,6 +678,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -740,6 +749,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -923,6 +933,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -993,6 +1004,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1043,6 +1055,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1113,6 +1126,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1230,6 +1244,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1300,6 +1315,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1350,6 +1366,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1420,6 +1437,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1671,6 +1689,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1741,6 +1760,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1791,6 +1811,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1861,6 +1882,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 0db7052a6c..91699c1bf0 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The StaffMember was successfully created, which resulted in additional changes. The newly created StaffMember is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -476,6 +481,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -527,6 +533,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -576,7 +583,8 @@ "description": "The Supermarket was successfully created, which resulted in additional changes. The newly created Supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -670,6 +678,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -740,6 +749,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -923,6 +933,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -993,6 +1004,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1043,6 +1055,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1113,6 +1126,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1230,6 +1244,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1300,6 +1315,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1350,6 +1366,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1420,6 +1437,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1671,6 +1689,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1741,6 +1760,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1791,6 +1811,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1861,6 +1882,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 7827c1d9db..0609d32caf 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -926,6 +935,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -996,6 +1006,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1046,6 +1057,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1116,6 +1128,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1233,6 +1246,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1303,6 +1317,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1353,6 +1368,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1423,6 +1439,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1674,6 +1691,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1744,6 +1762,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1794,6 +1813,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1864,6 +1884,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 419b84f679..ae0477558a 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -926,6 +935,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -996,6 +1006,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1046,6 +1057,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1116,6 +1128,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1233,6 +1246,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1303,6 +1317,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1353,6 +1368,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1423,6 +1439,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1674,6 +1691,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1744,6 +1762,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1794,6 +1813,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1864,6 +1884,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 9071c3b3ad..44a4eec4af 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -792,6 +801,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -862,6 +872,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -912,6 +923,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -982,6 +994,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1099,6 +1112,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1169,6 +1183,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1219,6 +1234,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1289,6 +1305,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1406,6 +1423,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1476,6 +1494,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1526,6 +1545,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1596,6 +1616,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1713,6 +1734,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1783,6 +1805,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1833,6 +1856,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1903,6 +1927,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2154,6 +2179,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2224,6 +2250,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2274,6 +2301,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2344,6 +2372,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 186e103a26..3c515abacc 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -792,6 +801,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -862,6 +872,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -912,6 +923,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -982,6 +994,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1099,6 +1112,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1169,6 +1183,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1219,6 +1234,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1289,6 +1305,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1406,6 +1423,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1476,6 +1494,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1526,6 +1545,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1596,6 +1616,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1713,6 +1734,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1783,6 +1805,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1833,6 +1856,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1903,6 +1927,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2154,6 +2179,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2224,6 +2250,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2274,6 +2301,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2344,6 +2372,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index c8972b21db..132f0cb431 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The nameValuePair was successfully created, which resulted in additional changes. The newly created nameValuePair is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -783,6 +792,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -834,6 +844,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -883,7 +894,8 @@ "description": "The node was successfully created, which resulted in additional changes. The newly created node is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -977,6 +989,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1047,6 +1060,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1230,6 +1244,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1300,6 +1315,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1350,6 +1366,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1420,6 +1437,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1671,6 +1689,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1741,6 +1760,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1791,6 +1811,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1861,6 +1882,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1978,6 +2000,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2048,6 +2071,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2098,6 +2122,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2168,6 +2193,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index cb97ac4259..a2e52bf12c 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -38,6 +38,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -89,6 +90,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -138,7 +140,8 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -232,6 +235,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -302,6 +306,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -485,6 +490,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -555,6 +561,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -605,6 +612,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -675,6 +683,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -917,6 +926,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -968,6 +978,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1017,7 +1028,8 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -1111,6 +1123,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1181,6 +1194,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1364,6 +1378,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1434,6 +1449,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1484,6 +1500,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1554,6 +1571,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1805,6 +1823,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1875,6 +1894,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1925,6 +1945,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1995,6 +2016,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2237,6 +2259,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2288,6 +2311,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2337,7 +2361,8 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -2431,6 +2456,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2501,6 +2527,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2684,6 +2711,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2754,6 +2782,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2804,6 +2833,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2874,6 +2904,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2991,6 +3022,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3061,6 +3093,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3111,6 +3144,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3181,6 +3215,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3432,6 +3467,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3502,6 +3538,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3552,6 +3589,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3622,6 +3660,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3873,6 +3912,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3943,6 +3983,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3993,6 +4034,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4063,6 +4105,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4171,6 +4214,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4222,6 +4266,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4271,7 +4316,8 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "Location of the newly created resource." + "description": "Location of the newly created resource.", + "required": true } }, "content": { @@ -4365,6 +4411,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4435,6 +4482,7 @@ "headers": { "ETag": { "description": "ETag identifying the version of the fetched resource.", + "required": true, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } From 36d5ff7bf263202f91b56d32ec6e1f4b98f4f926 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 00:27:51 -0500 Subject: [PATCH 06/36] Add schema to headers --- .../JsonApiDotNetCoreExample.json | 123 +++++++++++++- .../JsonApiOperationDocumentationFilter.cs | 10 +- .../LegacyClient/swagger.g.json | 152 +++++++++++++++++- .../CamelCase/swagger.g.json | 70 +++++++- .../KebabCase/swagger.g.json | 70 +++++++- .../PascalCase/swagger.g.json | 70 +++++++- .../ModelStateValidationOff/swagger.g.json | 65 +++++++- .../ModelStateValidationOn/swagger.g.json | 65 +++++++- .../ModelStateValidationOff/swagger.g.json | 89 +++++++++- .../ModelStateValidationOn/swagger.g.json | 89 +++++++++- .../QueryStrings/swagger.g.json | 82 +++++++++- 11 files changed, 865 insertions(+), 20 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 9eab13f169..9805a74783 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -936,6 +963,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1007,6 +1037,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1058,6 +1091,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1129,6 +1165,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1372,6 +1411,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1424,6 +1466,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1474,7 +1519,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -1569,6 +1617,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1640,6 +1691,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1824,6 +1878,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1895,6 +1952,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1946,6 +2006,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2017,6 +2080,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2260,6 +2326,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2312,6 +2381,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2362,7 +2434,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -2457,6 +2532,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2528,6 +2606,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2712,6 +2793,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2783,6 +2867,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2834,6 +2921,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2905,6 +2995,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3023,6 +3116,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3094,6 +3190,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3145,6 +3244,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3216,6 +3318,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3334,6 +3439,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3405,6 +3513,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3456,6 +3567,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3527,6 +3641,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 375b2aecf4..f220f0316d 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -447,6 +447,10 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus { Description = "ETag identifying the version of the fetched resource.", Required = true, + Schema = new OpenApiSchema + { + Type = "string" + }, Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") }; } @@ -458,7 +462,11 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt response.Headers[HeaderNames.Location] = new OpenApiHeader { Description = "Location of the newly created resource.", - Required = true + Required = true, + Schema = new OpenApiSchema + { + Type = "string" + } }; } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index a2e52bf12c..c1e3078e54 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -927,6 +954,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -979,6 +1009,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1029,7 +1062,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -1124,6 +1160,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1195,6 +1234,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1379,6 +1421,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1450,6 +1495,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1501,6 +1549,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1572,6 +1623,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1824,6 +1878,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1895,6 +1952,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1946,6 +2006,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2017,6 +2080,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2260,6 +2326,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2312,6 +2381,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2362,7 +2434,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -2457,6 +2532,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2528,6 +2606,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2712,6 +2793,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2783,6 +2867,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2834,6 +2921,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2905,6 +2995,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3023,6 +3116,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3094,6 +3190,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3145,6 +3244,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3216,6 +3318,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3468,6 +3573,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3539,6 +3647,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3590,6 +3701,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3661,6 +3775,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3913,6 +4030,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3984,6 +4104,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4035,6 +4158,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4106,6 +4232,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4215,6 +4344,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4267,6 +4399,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4317,7 +4452,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -4412,6 +4550,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4483,6 +4624,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index ea611a9015..ddd547669e 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -482,6 +497,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -534,6 +552,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -584,7 +605,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -679,6 +703,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -750,6 +777,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -934,6 +964,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1005,6 +1038,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1056,6 +1092,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1127,6 +1166,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1245,6 +1287,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1316,6 +1361,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1367,6 +1415,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1438,6 +1489,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1690,6 +1744,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1761,6 +1818,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1812,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1883,6 +1946,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index bc215c5fcf..d90956992b 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -482,6 +497,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -534,6 +552,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -584,7 +605,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -679,6 +703,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -750,6 +777,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -934,6 +964,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1005,6 +1038,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1056,6 +1092,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1127,6 +1166,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1245,6 +1287,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1316,6 +1361,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1367,6 +1415,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1438,6 +1489,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1690,6 +1744,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1761,6 +1818,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1812,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1883,6 +1946,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 91699c1bf0..76c8c33eab 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -482,6 +497,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -534,6 +552,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -584,7 +605,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -679,6 +703,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -750,6 +777,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -934,6 +964,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1005,6 +1038,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1056,6 +1092,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1127,6 +1166,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1245,6 +1287,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1316,6 +1361,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1367,6 +1415,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1438,6 +1489,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1690,6 +1744,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1761,6 +1818,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1812,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1883,6 +1946,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 0609d32caf..b30df6cc0e 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -936,6 +963,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1007,6 +1037,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1058,6 +1091,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1129,6 +1165,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1247,6 +1286,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1318,6 +1360,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1369,6 +1414,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1440,6 +1488,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1692,6 +1743,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1763,6 +1817,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1814,6 +1871,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1885,6 +1945,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index ae0477558a..b66efddeb6 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -936,6 +963,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1007,6 +1037,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1058,6 +1091,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1129,6 +1165,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1247,6 +1286,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1318,6 +1360,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1369,6 +1414,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1440,6 +1488,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1692,6 +1743,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1763,6 +1817,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1814,6 +1871,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1885,6 +1945,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 44a4eec4af..1043374b3b 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -802,6 +829,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -873,6 +903,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -924,6 +957,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -995,6 +1031,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1113,6 +1152,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1184,6 +1226,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1235,6 +1280,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1306,6 +1354,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1424,6 +1475,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1495,6 +1549,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1546,6 +1603,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1617,6 +1677,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1735,6 +1798,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1806,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1857,6 +1926,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1928,6 +2000,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2180,6 +2255,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2251,6 +2329,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2302,6 +2383,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2373,6 +2457,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 3c515abacc..2fae90d4c2 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -802,6 +829,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -873,6 +903,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -924,6 +957,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -995,6 +1031,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1113,6 +1152,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1184,6 +1226,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1235,6 +1280,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1306,6 +1354,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1424,6 +1475,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1495,6 +1549,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1546,6 +1603,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1617,6 +1677,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1735,6 +1798,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1806,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1857,6 +1926,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1928,6 +2000,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2180,6 +2255,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2251,6 +2329,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2302,6 +2383,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2373,6 +2457,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 132f0cb431..d30a7574a6 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -793,6 +820,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -845,6 +875,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -895,7 +928,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -990,6 +1026,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1061,6 +1100,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1245,6 +1287,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1316,6 +1361,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1367,6 +1415,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1438,6 +1489,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1690,6 +1744,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1761,6 +1818,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1812,6 +1872,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1883,6 +1946,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2001,6 +2067,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2072,6 +2141,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2123,6 +2195,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2194,6 +2269,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } From 0a6c833ea47e3eb102ca128708943408ce9a37ed Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 00:35:38 -0500 Subject: [PATCH 07/36] Fix test --- .../LegacyOpenApiIntegration/swagger.json | 152 +++++++++++++++++- 1 file changed, 148 insertions(+), 4 deletions(-) diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index a2e52bf12c..c1e3078e54 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -39,6 +39,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -91,6 +94,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -141,7 +147,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -236,6 +245,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -307,6 +319,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -491,6 +506,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -562,6 +580,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -613,6 +634,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -684,6 +708,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -927,6 +954,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -979,6 +1009,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1029,7 +1062,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -1124,6 +1160,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1195,6 +1234,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1379,6 +1421,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1450,6 +1495,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1501,6 +1549,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1572,6 +1623,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1824,6 +1878,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -1895,6 +1952,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -1946,6 +2006,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2017,6 +2080,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2260,6 +2326,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2312,6 +2381,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2362,7 +2434,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -2457,6 +2532,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2528,6 +2606,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2712,6 +2793,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2783,6 +2867,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -2834,6 +2921,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -2905,6 +2995,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3023,6 +3116,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3094,6 +3190,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3145,6 +3244,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3216,6 +3318,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3468,6 +3573,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3539,6 +3647,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3590,6 +3701,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3661,6 +3775,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -3913,6 +4030,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -3984,6 +4104,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4035,6 +4158,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4106,6 +4232,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4215,6 +4344,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4267,6 +4399,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } @@ -4317,7 +4452,10 @@ "headers": { "Location": { "description": "Location of the newly created resource.", - "required": true + "required": true, + "schema": { + "type": "string" + } } }, "content": { @@ -4412,6 +4550,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } }, @@ -4483,6 +4624,9 @@ "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, + "schema": { + "type": "string" + }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } From 31b3b3a31c2567fa4b42f6d6c7e9058faf6bd643 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 16:46:10 -0500 Subject: [PATCH 08/36] Use WrapResponses option for NSwag --- .../JsonApiDotNetCoreExampleClient.csproj | 2 +- src/Examples/JsonApiDotNetCoreExampleClient/Program.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index 7d03f808b6..5870d6df48 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -25,7 +25,7 @@ - /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs index a174a94747..62827dd2bc 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs @@ -12,7 +12,7 @@ var apiClient = new ExampleApiClient(httpClient); -PersonCollectionResponseDocument getResponse = await apiClient.GetPersonCollectionAsync(new Dictionary +JsonApiResponse getResponse = await apiClient.GetPersonCollectionAsync(new Dictionary { ["filter"] = "has(assignedTodoItems)", ["sort"] = "-lastName", @@ -20,9 +20,9 @@ ["include"] = "assignedTodoItems.tags" }); -foreach (PersonDataInResponse person in getResponse.Data) +foreach (PersonDataInResponse person in getResponse.Result.Data) { - PrintPerson(person, getResponse.Included); + PrintPerson(person, getResponse.Result.Included); } var patchRequest = new PersonPatchRequestDocument From f371aa5d65e3fb0250d9f659c3138785158a8bec Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 17:06:16 -0500 Subject: [PATCH 09/36] Document 304 + If-None-Match --- .../JsonApiDotNetCoreExample.json | 756 ++++++++++++++++++ .../JsonApiDotNetCoreExampleClient.csproj | 3 +- .../JsonApiOperationDocumentationFilter.cs | 44 +- .../DocComments/DocCommentsTests.cs | 96 ++- 4 files changed, 870 insertions(+), 29 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 9805a74783..2658e97736 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -954,6 +1122,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -977,6 +1153,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1028,6 +1217,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1044,6 +1241,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1082,6 +1292,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1105,6 +1323,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1156,6 +1387,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1172,6 +1411,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1402,6 +1654,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1425,6 +1685,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1457,6 +1730,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1473,6 +1754,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -1608,6 +1902,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1631,6 +1933,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1682,6 +1997,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1698,6 +2021,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1869,6 +2205,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1892,6 +2236,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1943,6 +2300,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1959,6 +2324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1997,6 +2375,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2020,6 +2406,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2071,6 +2470,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2087,6 +2494,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2317,6 +2737,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2340,6 +2768,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2372,6 +2813,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2388,6 +2837,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -2523,6 +2985,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2546,6 +3016,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2597,6 +3080,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2613,6 +3104,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2784,6 +3288,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2807,6 +3319,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2858,6 +3383,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2874,6 +3407,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2912,6 +3458,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2935,6 +3489,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2986,6 +3553,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3002,6 +3577,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3107,6 +3695,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3130,6 +3726,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3181,6 +3790,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3197,6 +3814,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3235,6 +3865,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3258,6 +3896,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3309,6 +3960,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3325,6 +3984,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3430,6 +4102,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3453,6 +4133,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3504,6 +4197,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3520,6 +4221,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3558,6 +4272,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3581,6 +4303,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3632,6 +4367,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3648,6 +4391,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index 5870d6df48..a2795160c1 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -2,6 +2,7 @@ net8.0 + enable Exe @@ -25,7 +26,7 @@ - /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index f220f0316d..f734970fad 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -31,6 +31,7 @@ internal sealed class JsonApiOperationDocumentationFilter : IOperationFilter "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched."; private const string TextCompletedSuccessfully = "The operation completed successfully."; + private const string TextNotModified = "The resource was not modified."; private const string TextQueryStringBad = "The query string is invalid."; private const string TextRequestBodyBad = "The request body is missing or malformed."; private const string TextQueryStringOrRequestBodyBad = "The query string is invalid or the request body is missing or malformed."; @@ -164,6 +165,8 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } else { @@ -173,9 +176,12 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res $"Successfully returns the found {resourceType}, or an empty array if none were found."); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } AddQueryStringParameters(operation, false); + AddHeaderParameterIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); } else if (operation.Parameters.Count == 1) @@ -188,16 +194,21 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } else { SetOperationSummary(operation, $"Retrieves an individual {singularName} by its identifier."); SetResponseDescription(operation.Responses, HttpStatusCode.OK, $"Successfully returns the found {singularName}."); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularName} to retrieve."); AddQueryStringParameters(operation, false); + AddHeaderParameterIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularName} does not exist."); } @@ -280,6 +291,8 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } else { @@ -291,10 +304,13 @@ relationship is HasOneAttribute : $"Successfully returns the found {rightName}, or an empty array if none were found."); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {rightName} to retrieve."); AddQueryStringParameters(operation, false); + AddHeaderParameterIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularLeftName} does not exist."); } @@ -315,6 +331,8 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } else { @@ -327,10 +345,13 @@ relationship is HasOneAttribute : $"Successfully returns the found {singularRightName} {ident}, or an empty array if none were found."); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); + SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {singularRightName} {ident} to retrieve."); AddQueryStringParameters(operation, true); + AddHeaderParameterIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularLeftName} does not exist."); } @@ -435,13 +456,13 @@ private static void SetRequestBodyDescription(OpenApiRequestBody requestBody, st private static void SetResponseDescription(OpenApiResponses responses, HttpStatusCode statusCode, string description) { - OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + OpenApiResponse response = GetOrAddResponse(responses, statusCode); response.Description = XmlCommentsTextHelper.Humanize(description); } private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatusCode statusCode) { - OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + OpenApiResponse response = GetOrAddResponse(responses, statusCode); response.Headers[HeaderNames.ETag] = new OpenApiHeader { @@ -457,7 +478,7 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode) { - OpenApiResponse response = GetOrCreateResponse(responses, statusCode); + OpenApiResponse response = GetOrAddResponse(responses, statusCode); response.Headers[HeaderNames.Location] = new OpenApiHeader { @@ -470,7 +491,7 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt }; } - private static OpenApiResponse GetOrCreateResponse(OpenApiResponses responses, HttpStatusCode statusCode) + private static OpenApiResponse GetOrAddResponse(OpenApiResponses responses, HttpStatusCode statusCode) { string responseCode = ((int)statusCode).ToString(); @@ -513,4 +534,19 @@ private static void AddQueryStringParameters(OpenApiOperation operation, bool is Description = isRelationshipEndpoint ? RelationshipQueryStringParameters : ResourceQueryStringParameters }); } + + private static void AddHeaderParameterIfNoneMatch(OpenApiOperation operation) + { + operation.Parameters.Add(new OpenApiParameter + { + In = ParameterLocation.Header, + Name = "If-None-Match", + Description = "ETag identifying the version of the requested resource.", + Required = false, + Schema = new OpenApiSchema + { + Type = "string" + } + }); + } } diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index 0da91cf7b2..8b7ca8e93b 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -67,17 +67,21 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(1); + parametersElement.EnumerateArray().ShouldHaveCount(2); parametersElement.Should().HaveProperty("[0].in", "query"); parametersElement.Should().HaveProperty("[0].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[1].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[1].in", "header"); + parametersElement.Should().HaveProperty("[1].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(2); + responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscrapers, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -89,17 +93,21 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(1); + parametersElement.EnumerateArray().ShouldHaveCount(2); parametersElement.Should().HaveProperty("[0].in", "query"); parametersElement.Should().HaveProperty("[0].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[1].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[1].in", "header"); + parametersElement.Should().HaveProperty("[1].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(2); + responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -136,19 +144,23 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscraper."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -161,19 +173,23 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -234,19 +250,23 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related elevator to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -259,19 +279,23 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related elevator to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -286,19 +310,23 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related elevator identity to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator identity, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -311,19 +339,23 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related elevator identity to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -361,19 +393,23 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related spaces to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found spaces, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -386,19 +422,23 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related spaces to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -413,19 +453,23 @@ public async Task Endpoints_are_documented() getElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related space identities to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); getElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found space identities, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -438,19 +482,23 @@ public async Task Endpoints_are_documented() headElement.Should().ContainPath("parameters").With(parametersElement => { - parametersElement.EnumerateArray().ShouldHaveCount(2); + parametersElement.EnumerateArray().ShouldHaveCount(3); parametersElement.Should().HaveProperty("[0].in", "path"); parametersElement.Should().HaveProperty("[0].description", "The identifier of the skyscraper whose related space identities to retrieve."); parametersElement.Should().HaveProperty("[1].in", "query"); parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); + parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); + parametersElement.Should().HaveProperty("[2].in", "header"); + parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); }); headElement.Should().ContainPath("responses").With(responsesElement => { - responsesElement.EnumerateObject().ShouldHaveCount(3); + responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); From 4992baaa6ceb3db6bcd43e308fb7df9408e15d19 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 8 Feb 2024 18:40:50 -0500 Subject: [PATCH 10/36] Stuff --- .../JsonApiDotNetCoreExample.json | 252 +++-- .../JsonApiDotNetCoreExampleClient.csproj | 2 +- .../JsonApiDotNetCoreExampleClient/Program.cs | 30 +- .../JsonApiOperationDocumentationFilter.cs | 7 +- .../LegacyClient/swagger.g.json | 924 ++++++++++++++++++ .../CamelCase/swagger.g.json | 420 ++++++++ .../KebabCase/swagger.g.json | 420 ++++++++ .../PascalCase/swagger.g.json | 420 ++++++++ .../ModelStateValidationOff/swagger.g.json | 420 ++++++++ .../ModelStateValidationOn/swagger.g.json | 420 ++++++++ .../ModelStateValidationOff/swagger.g.json | 588 +++++++++++ .../ModelStateValidationOn/swagger.g.json | 588 +++++++++++ .../QueryStrings/swagger.g.json | 504 ++++++++++ .../LegacyOpenApiIntegration/swagger.json | 924 ++++++++++++++++++ 14 files changed, 5838 insertions(+), 81 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 2658e97736..cd3f2ba9e4 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -36,8 +36,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -112,8 +115,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -284,8 +290,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -379,8 +388,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -587,8 +599,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -682,8 +697,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -757,8 +775,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -852,8 +873,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1128,8 +1152,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1223,8 +1250,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1298,8 +1328,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1393,8 +1426,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1660,8 +1696,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1736,8 +1775,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1908,8 +1950,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2003,8 +2048,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2211,8 +2259,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2306,8 +2357,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2381,8 +2435,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2476,8 +2533,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2743,8 +2803,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2819,8 +2882,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2991,8 +3057,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3086,8 +3155,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3294,8 +3366,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3389,8 +3464,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3464,8 +3542,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3559,8 +3640,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3701,8 +3785,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3796,8 +3883,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3871,8 +3961,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3966,8 +4059,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4108,8 +4204,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4203,8 +4302,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4278,8 +4380,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4373,8 +4478,11 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "default": null, + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index a2795160c1..c5ccacd00e 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -26,7 +26,7 @@ - /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs index 62827dd2bc..d3562f1e2a 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs @@ -1,5 +1,8 @@ using JsonApiDotNetCore.OpenApi.Client; +using JsonApiDotNetCore.OpenApi.Client.Exceptions; using JsonApiDotNetCoreExampleClient; +using Microsoft.AspNetCore.Http; +using Microsoft.Net.Http.Headers; #if DEBUG using var httpClient = new HttpClient(new ColoredConsoleLogDelegatingHandler @@ -12,13 +15,15 @@ var apiClient = new ExampleApiClient(httpClient); -JsonApiResponse getResponse = await apiClient.GetPersonCollectionAsync(new Dictionary +JsonApiResponse getResponse = await GetPersonCollectionAsync(apiClient); + +try { - ["filter"] = "has(assignedTodoItems)", - ["sort"] = "-lastName", - ["page[size]"] = "5", - ["include"] = "assignedTodoItems.tags" -}); + getResponse = await GetPersonCollectionAsync(apiClient, getResponse.Headers[HeaderNames.ETag].First()); +} +catch (ApiException exception) when (exception.StatusCode == StatusCodes.Status304NotModified) +{ +} foreach (PersonDataInResponse person in getResponse.Result.Data) { @@ -47,6 +52,19 @@ Console.WriteLine("Press any key to close."); Console.ReadKey(); +#pragma warning disable AV1553 +static Task> GetPersonCollectionAsync(ExampleApiClient apiClient, string? ifNoneMatch = null) +#pragma warning restore AV1553 +{ + return apiClient.GetPersonCollectionAsync(new Dictionary + { + ["filter"] = "has(assignedTodoItems)", + ["sort"] = "-lastName", + ["page[size]"] = "5", + ["include"] = "assignedTodoItems.tags" + }, ifNoneMatch); +} + static void PrintPerson(PersonDataInResponse person, ICollection includes) { ToManyTodoItemInResponse assignedTodoItems = person.Relationships.AssignedTodoItems; diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index f734970fad..77935a7aa1 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -545,8 +545,11 @@ private static void AddHeaderParameterIfNoneMatch(OpenApiOperation operation) Required = false, Schema = new OpenApiSchema { - Type = "string" - } + Type = "string", + Default = new OpenApiString(null), + Nullable = true, + }, + Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") }); } } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index c1e3078e54..3b0df75eb4 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -945,6 +1113,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -968,6 +1144,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1000,6 +1189,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1016,6 +1213,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -1151,6 +1361,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1174,6 +1392,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1225,6 +1456,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1241,6 +1480,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1412,6 +1664,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1435,6 +1695,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1486,6 +1759,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1502,6 +1783,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1540,6 +1834,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1563,6 +1865,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1614,6 +1929,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1630,6 +1953,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1869,6 +2205,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1892,6 +2236,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1943,6 +2300,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1959,6 +2324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1997,6 +2375,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2020,6 +2406,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2071,6 +2470,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2087,6 +2494,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2317,6 +2737,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2340,6 +2768,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2372,6 +2813,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2388,6 +2837,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -2523,6 +2985,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2546,6 +3016,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2597,6 +3080,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2613,6 +3104,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2784,6 +3288,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2807,6 +3319,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2858,6 +3383,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2874,6 +3407,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2912,6 +3458,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2935,6 +3489,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2986,6 +3553,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3002,6 +3577,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3107,6 +3695,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3130,6 +3726,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3181,6 +3790,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3197,6 +3814,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3235,6 +3865,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3258,6 +3896,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3309,6 +3960,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3325,6 +3984,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3564,6 +4236,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3587,6 +4267,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3638,6 +4331,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3654,6 +4355,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3692,6 +4406,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3715,6 +4437,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3766,6 +4501,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3782,6 +4525,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4021,6 +4777,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4044,6 +4808,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4095,6 +4872,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4111,6 +4896,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4149,6 +4947,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4172,6 +4978,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4223,6 +5042,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4239,6 +5066,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4335,6 +5175,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4358,6 +5206,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4390,6 +5251,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4406,6 +5275,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -4541,6 +5423,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4564,6 +5454,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4615,6 +5518,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4631,6 +5542,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index ddd547669e..dc736d8273 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -488,6 +572,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -511,6 +603,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -543,6 +648,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -559,6 +672,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -694,6 +820,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -717,6 +851,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -768,6 +915,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -784,6 +939,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -955,6 +1123,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -978,6 +1154,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1029,6 +1218,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1045,6 +1242,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1083,6 +1293,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1106,6 +1324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1157,6 +1388,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1173,6 +1412,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1278,6 +1530,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1301,6 +1561,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1352,6 +1625,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1368,6 +1649,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1406,6 +1700,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1429,6 +1731,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1480,6 +1795,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1496,6 +1819,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1735,6 +2071,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1758,6 +2102,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1809,6 +2166,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1825,6 +2190,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1863,6 +2241,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1886,6 +2272,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1937,6 +2336,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1953,6 +2360,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index d90956992b..e711add852 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -488,6 +572,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -511,6 +603,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -543,6 +648,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -559,6 +672,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -694,6 +820,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -717,6 +851,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -768,6 +915,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -784,6 +939,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -955,6 +1123,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -978,6 +1154,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1029,6 +1218,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1045,6 +1242,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1083,6 +1293,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1106,6 +1324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1157,6 +1388,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1173,6 +1412,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1278,6 +1530,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1301,6 +1561,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1352,6 +1625,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1368,6 +1649,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1406,6 +1700,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1429,6 +1731,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1480,6 +1795,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1496,6 +1819,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1735,6 +2071,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1758,6 +2102,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1809,6 +2166,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1825,6 +2190,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1863,6 +2241,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1886,6 +2272,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1937,6 +2336,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1953,6 +2360,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 76c8c33eab..55da678be2 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -488,6 +572,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -511,6 +603,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -543,6 +648,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -559,6 +672,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -694,6 +820,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -717,6 +851,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -768,6 +915,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -784,6 +939,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -955,6 +1123,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -978,6 +1154,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1029,6 +1218,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1045,6 +1242,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1083,6 +1293,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1106,6 +1324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1157,6 +1388,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1173,6 +1412,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1278,6 +1530,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1301,6 +1561,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1352,6 +1625,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1368,6 +1649,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1406,6 +1700,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1429,6 +1731,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1480,6 +1795,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1496,6 +1819,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1735,6 +2071,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1758,6 +2102,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1809,6 +2166,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1825,6 +2190,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1863,6 +2241,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1886,6 +2272,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1937,6 +2336,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1953,6 +2360,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index b30df6cc0e..892cb4141b 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -954,6 +1122,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -977,6 +1153,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1028,6 +1217,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1044,6 +1241,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1082,6 +1292,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1105,6 +1323,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1156,6 +1387,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1172,6 +1411,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1277,6 +1529,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1300,6 +1560,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1351,6 +1624,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1367,6 +1648,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1405,6 +1699,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1428,6 +1730,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1479,6 +1794,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1495,6 +1818,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1734,6 +2070,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1757,6 +2101,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1808,6 +2165,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1824,6 +2189,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1862,6 +2240,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1885,6 +2271,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1936,6 +2335,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1952,6 +2359,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index b66efddeb6..e2bc3858fb 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -954,6 +1122,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -977,6 +1153,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1028,6 +1217,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1044,6 +1241,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1082,6 +1292,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1105,6 +1323,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1156,6 +1387,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1172,6 +1411,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1277,6 +1529,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1300,6 +1560,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1351,6 +1624,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1367,6 +1648,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1405,6 +1699,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1428,6 +1730,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1479,6 +1794,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1495,6 +1818,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1734,6 +2070,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1757,6 +2101,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1808,6 +2165,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1824,6 +2189,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1862,6 +2240,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1885,6 +2271,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1936,6 +2335,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1952,6 +2359,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 1043374b3b..2108e79321 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -820,6 +988,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -843,6 +1019,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -894,6 +1083,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -910,6 +1107,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -948,6 +1158,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -971,6 +1189,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1022,6 +1253,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1038,6 +1277,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1143,6 +1395,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1166,6 +1426,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1217,6 +1490,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1233,6 +1514,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1271,6 +1565,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1294,6 +1596,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1345,6 +1660,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1361,6 +1684,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1466,6 +1802,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1489,6 +1833,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1540,6 +1897,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1556,6 +1921,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1594,6 +1972,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1617,6 +2003,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1668,6 +2067,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1684,6 +2091,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1789,6 +2209,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1812,6 +2240,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1863,6 +2304,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1879,6 +2328,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1917,6 +2379,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1940,6 +2410,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1991,6 +2474,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2007,6 +2498,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2246,6 +2750,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2269,6 +2781,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2320,6 +2845,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2336,6 +2869,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2374,6 +2920,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2397,6 +2951,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2448,6 +3015,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2464,6 +3039,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 2fae90d4c2..56570d5d6f 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -820,6 +988,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -843,6 +1019,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -894,6 +1083,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -910,6 +1107,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -948,6 +1158,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -971,6 +1189,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1022,6 +1253,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1038,6 +1277,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1143,6 +1395,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1166,6 +1426,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1217,6 +1490,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1233,6 +1514,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1271,6 +1565,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1294,6 +1596,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1345,6 +1660,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1361,6 +1684,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1466,6 +1802,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1489,6 +1833,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1540,6 +1897,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1556,6 +1921,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1594,6 +1972,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1617,6 +2003,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1668,6 +2067,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1684,6 +2091,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1789,6 +2209,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1812,6 +2240,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1863,6 +2304,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1879,6 +2328,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1917,6 +2379,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1940,6 +2410,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1991,6 +2474,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2007,6 +2498,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2246,6 +2750,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2269,6 +2781,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2320,6 +2845,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2336,6 +2869,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2374,6 +2920,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2397,6 +2951,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2448,6 +3015,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2464,6 +3039,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index d30a7574a6..0ea4b40635 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -811,6 +979,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -834,6 +1010,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -866,6 +1055,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -882,6 +1079,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -1017,6 +1227,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1040,6 +1258,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1091,6 +1322,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1107,6 +1346,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1278,6 +1530,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1301,6 +1561,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1352,6 +1625,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1368,6 +1649,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1406,6 +1700,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1429,6 +1731,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1480,6 +1795,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1496,6 +1819,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1735,6 +2071,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1758,6 +2102,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1809,6 +2166,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1825,6 +2190,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1863,6 +2241,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1886,6 +2272,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1937,6 +2336,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1953,6 +2360,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2058,6 +2478,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2081,6 +2509,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2132,6 +2573,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2148,6 +2597,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2186,6 +2648,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2209,6 +2679,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2260,6 +2743,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2276,6 +2767,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index c1e3078e54..3b0df75eb4 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -30,6 +30,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -53,6 +61,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -85,6 +106,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -101,6 +130,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -236,6 +278,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -259,6 +309,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -310,6 +373,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -326,6 +397,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -497,6 +581,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -520,6 +612,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -571,6 +676,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -587,6 +700,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -625,6 +751,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -648,6 +782,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -699,6 +846,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -715,6 +870,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -945,6 +1113,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -968,6 +1144,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1000,6 +1189,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1016,6 +1213,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -1151,6 +1361,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1174,6 +1392,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1225,6 +1456,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1241,6 +1480,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1412,6 +1664,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1435,6 +1695,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1486,6 +1759,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1502,6 +1783,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1540,6 +1834,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1563,6 +1865,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1614,6 +1929,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1630,6 +1953,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1869,6 +2205,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1892,6 +2236,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1943,6 +2300,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -1959,6 +2324,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -1997,6 +2375,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2020,6 +2406,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2071,6 +2470,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2087,6 +2494,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2317,6 +2737,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2340,6 +2768,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2372,6 +2813,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2388,6 +2837,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -2523,6 +2985,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2546,6 +3016,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2597,6 +3080,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2613,6 +3104,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2784,6 +3288,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2807,6 +3319,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2858,6 +3383,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2874,6 +3407,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -2912,6 +3458,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -2935,6 +3489,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2986,6 +3553,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3002,6 +3577,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3107,6 +3695,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3130,6 +3726,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3181,6 +3790,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3197,6 +3814,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3235,6 +3865,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3258,6 +3896,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3309,6 +3960,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3325,6 +3984,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3564,6 +4236,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3587,6 +4267,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3638,6 +4331,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3654,6 +4355,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -3692,6 +4406,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3715,6 +4437,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3766,6 +4501,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3782,6 +4525,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4021,6 +4777,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4044,6 +4808,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4095,6 +4872,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4111,6 +4896,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4149,6 +4947,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4172,6 +4978,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4223,6 +5042,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4239,6 +5066,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, @@ -4335,6 +5175,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4358,6 +5206,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4390,6 +5251,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4406,6 +5275,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." } @@ -4541,6 +5423,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4564,6 +5454,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4615,6 +5518,14 @@ }, "example": "" } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "ETag identifying the version of the requested resource.", + "schema": { + "type": "string" + } } ], "responses": { @@ -4631,6 +5542,19 @@ } } }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } + }, "400": { "description": "The query string is invalid." }, From 61dd786bc90f3ac1e70983ba92674aac45541f65 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Mon, 12 Feb 2024 18:05:57 -0500 Subject: [PATCH 11/36] Add content length header --- .../JsonApiOperationDocumentationFilter.cs | 20 +++++++++++++++++++ .../DocComments/DocCommentsTests.cs | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 77935a7aa1..e1b71f0c65 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -165,6 +165,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } @@ -194,6 +195,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } @@ -291,6 +293,7 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } @@ -330,6 +333,7 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); + SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); @@ -476,6 +480,22 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus }; } + private static void SetResponseHeaderContentLength(OpenApiResponses responses, HttpStatusCode statusCode) + { + OpenApiResponse response = GetOrAddResponse(responses, statusCode); + + response.Headers[HeaderNames.ContentLength] = new OpenApiHeader + { + Description = "Size of the response body in bytes", + Required = true, + Schema = new OpenApiSchema + { + Type = "integer", + }, + Example = new OpenApiInteger(322), + }; + } + private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode) { OpenApiResponse response = GetOrAddResponse(responses, statusCode); diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index 8b7ca8e93b..5f7b646885 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -107,6 +107,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); @@ -189,6 +190,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -295,6 +297,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -355,6 +358,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -438,6 +442,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -498,6 +503,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); From e34b303825c54e1cea461bd625999e79c9e8b223 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Tue, 13 Feb 2024 19:59:02 -0500 Subject: [PATCH 12/36] Idk anymore --- .../JsonApiDotNetCoreExample.json | 634 ++++++----- .../JsonApiDotNetCoreExampleClient.csproj | 2 +- .../JsonApiOperationDocumentationFilter.cs | 7 +- .../LegacyClient/RequestTests.cs | 12 +- .../LegacyClient/ResponseTests.cs | 18 +- .../LegacyClient/swagger.g.json | 992 ++++++++++------- .../CamelCase/swagger.g.json | 448 +++++--- .../KebabCase/swagger.g.json | 448 +++++--- .../PascalCase/swagger.g.json | 448 +++++--- .../OpenApiClientTests.csproj | 17 +- .../ModelStateValidationOff/swagger.g.json | 454 +++++--- .../ModelStateValidationOn/swagger.g.json | 454 +++++--- .../ModelStateValidationOff/swagger.g.json | 638 ++++++----- .../ModelStateValidationOn/swagger.g.json | 638 ++++++----- .../OpenApiEndToEndTests.csproj | 3 +- .../QueryStrings/swagger.g.json | 540 ++++++---- .../LegacyOpenApiIntegration/swagger.json | 994 +++++++++++------- 17 files changed, 4232 insertions(+), 2515 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index cd3f2ba9e4..e8085693be 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -37,7 +37,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -64,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -76,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -116,7 +115,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -133,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -291,7 +297,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -318,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -350,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -389,7 +394,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -406,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -600,7 +612,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -627,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -659,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -698,7 +709,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -715,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -776,7 +794,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -803,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -835,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -874,7 +891,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -884,6 +900,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1153,7 +1177,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1180,19 +1203,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1212,6 +1222,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1251,7 +1274,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1268,6 +1290,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1329,7 +1359,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1356,19 +1385,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1388,6 +1404,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1427,7 +1456,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1437,6 +1465,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1697,7 +1733,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1724,6 +1759,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -1736,16 +1781,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -1776,7 +1811,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1793,6 +1827,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1951,7 +1993,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -1978,19 +2019,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2010,6 +2038,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2049,7 +2090,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2066,6 +2106,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2260,7 +2308,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2287,19 +2334,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2319,6 +2353,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2358,7 +2405,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2375,8 +2421,16 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + } + } }, "304": { "description": "The resource was not modified.", @@ -2436,7 +2490,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2463,19 +2516,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2495,6 +2535,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2534,7 +2587,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2544,6 +2596,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2804,7 +2864,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2831,6 +2890,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -2843,16 +2912,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -2883,7 +2942,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -2900,6 +2958,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3058,7 +3124,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3085,19 +3150,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3117,6 +3169,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3156,7 +3221,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3173,6 +3237,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3367,7 +3439,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3394,19 +3465,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3426,6 +3484,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3465,7 +3536,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3482,6 +3552,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3543,7 +3621,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3570,19 +3647,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3602,6 +3666,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3641,7 +3718,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3651,6 +3727,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -3786,7 +3870,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3813,19 +3896,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3845,6 +3915,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3884,7 +3967,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3901,6 +3983,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3962,7 +4052,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -3989,19 +4078,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4021,6 +4097,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4060,7 +4149,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -4070,6 +4158,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -4205,7 +4301,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -4232,19 +4327,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4264,6 +4346,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4303,7 +4398,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -4320,6 +4414,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -4381,7 +4483,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -4408,19 +4509,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4440,6 +4528,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4479,7 +4580,6 @@ "description": "ETag identifying the version of the requested resource.", "schema": { "type": "string", - "default": null, "nullable": true }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" @@ -4489,6 +4589,14 @@ "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index c5ccacd00e..a2795160c1 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -26,7 +26,7 @@ - /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index e1b71f0c65..7d1c512f97 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -490,9 +490,9 @@ private static void SetResponseHeaderContentLength(OpenApiResponses responses, H Required = true, Schema = new OpenApiSchema { - Type = "integer", + Type = "integer" }, - Example = new OpenApiInteger(322), + Example = new OpenApiInteger(891) }; } @@ -566,8 +566,7 @@ private static void AddHeaderParameterIfNoneMatch(OpenApiOperation operation) Schema = new OpenApiSchema { Type = "string", - Default = new OpenApiString(null), - Nullable = true, + Nullable = true }, Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") }); diff --git a/test/OpenApiClientTests/LegacyClient/RequestTests.cs b/test/OpenApiClientTests/LegacyClient/RequestTests.cs index dc4bdfc75e..4c3dd0ef13 100644 --- a/test/OpenApiClientTests/LegacyClient/RequestTests.cs +++ b/test/OpenApiClientTests/LegacyClient/RequestTests.cs @@ -23,7 +23,7 @@ public async Task Getting_resource_collection_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCollectionAsync(null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCollectionAsync()); // Assert wrapper.Request.ShouldNotBeNull(); @@ -43,7 +43,7 @@ public async Task Getting_resource_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightAsync(flightId, null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightAsync(flightId)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -269,7 +269,7 @@ public async Task Getting_secondary_resource_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserAsync(flightId, null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserAsync(flightId)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -289,7 +289,7 @@ public async Task Getting_secondary_resources_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersAsync(flightId, null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersAsync(flightId)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -309,7 +309,7 @@ public async Task Getting_ToOne_relationship_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserRelationshipAsync(flightId, null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserRelationshipAsync(flightId)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -368,7 +368,7 @@ public async Task Getting_ToMany_relationship_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId, null)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId)); // Assert wrapper.Request.ShouldNotBeNull(); diff --git a/test/OpenApiClientTests/LegacyClient/ResponseTests.cs b/test/OpenApiClientTests/LegacyClient/ResponseTests.cs index 99df1935fe..c216e3c0c0 100644 --- a/test/OpenApiClientTests/LegacyClient/ResponseTests.cs +++ b/test/OpenApiClientTests/LegacyClient/ResponseTests.cs @@ -99,7 +99,7 @@ public async Task Getting_resource_collection_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightCollectionResponseDocument document = await apiClient.GetFlightCollectionAsync(null); + FlightCollectionResponseDocument document = await apiClient.GetFlightCollectionAsync(); // Assert document.Jsonapi.Should().BeNull(); @@ -180,7 +180,7 @@ public async Task Getting_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightPrimaryResponseDocument document = await apiClient.GetFlightAsync(flightId, null); + FlightPrimaryResponseDocument document = await apiClient.GetFlightAsync(flightId); // Assert document.Jsonapi.Should().BeNull(); @@ -218,7 +218,7 @@ public async Task Getting_unknown_resource_translates_error_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - Func> action = () => apiClient.GetFlightAsync(flightId, null); + Func> action = () => apiClient.GetFlightAsync(flightId); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; @@ -447,7 +447,7 @@ public async Task Getting_secondary_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightPurserAsync(flightId, null); + FlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightPurserAsync(flightId); // Assert document.Data.Should().NotBeNull(); @@ -479,7 +479,7 @@ public async Task Getting_nullable_secondary_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - NullableFlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightBackupPurserAsync(flightId, null); + NullableFlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightBackupPurserAsync(flightId); // Assert document.Data.Should().BeNull(); @@ -505,7 +505,7 @@ public async Task Getting_secondary_resources_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersAsync(flightId, null); + FlightAttendantCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersAsync(flightId); // Assert document.Data.Should().BeEmpty(); @@ -531,7 +531,7 @@ public async Task Getting_nullable_ToOne_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - NullableFlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightBackupPurserRelationshipAsync(flightId, null); + NullableFlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightBackupPurserRelationshipAsync(flightId); // Assert document.Data.Should().BeNull(); @@ -561,7 +561,7 @@ public async Task Getting_ToOne_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightPurserRelationshipAsync(flightId, null); + FlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightPurserRelationshipAsync(flightId); // Assert document.Data.Should().NotBeNull(); @@ -617,7 +617,7 @@ public async Task Getting_ToMany_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantIdentifierCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId, null); + FlightAttendantIdentifierCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId); // Assert document.Data.Should().HaveCount(2); diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index 3b0df75eb4..3df23256ea 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1119,8 +1167,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1144,6 +1194,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -1156,16 +1216,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -1195,8 +1245,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1210,6 +1262,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1367,8 +1427,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1392,19 +1454,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1424,6 +1473,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1462,8 +1524,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1477,6 +1541,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1670,8 +1742,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1695,19 +1769,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1727,6 +1788,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1765,8 +1839,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1780,6 +1856,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1840,8 +1924,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1865,19 +1951,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1897,6 +1970,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1935,14 +2021,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2211,8 +2307,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2236,19 +2334,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2268,6 +2353,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2306,8 +2404,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2321,6 +2421,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2381,8 +2489,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2406,19 +2516,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2438,6 +2535,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2476,14 +2586,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2743,8 +2863,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2768,6 +2890,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -2780,16 +2912,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -2819,8 +2941,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2834,6 +2958,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2991,8 +3123,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3016,19 +3150,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3048,6 +3169,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3086,8 +3220,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3101,6 +3237,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3294,8 +3438,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3319,19 +3465,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3351,6 +3484,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3389,8 +3535,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3404,6 +3552,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3464,8 +3620,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3489,19 +3647,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3521,6 +3666,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3559,16 +3717,26 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, + "ETag": { + "description": "ETag identifying the version of the fetched resource.", "required": true, "schema": { "type": "string" @@ -3701,8 +3869,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3726,19 +3896,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3758,6 +3915,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3796,8 +3966,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3811,6 +3983,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3871,8 +4051,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3896,19 +4078,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3928,6 +4097,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3966,14 +4148,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -4242,8 +4434,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4267,19 +4461,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4299,6 +4480,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4337,8 +4531,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4352,6 +4548,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -4412,8 +4616,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4437,19 +4643,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4469,6 +4662,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4507,14 +4713,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -4783,8 +4999,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4808,19 +5026,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4840,6 +5045,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4878,8 +5096,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4893,6 +5113,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -4953,8 +5181,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4978,19 +5208,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -5010,6 +5227,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -5048,14 +5278,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -5181,8 +5421,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5206,6 +5448,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -5218,16 +5470,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -5257,8 +5499,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5272,6 +5516,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -5429,8 +5681,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5454,19 +5708,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -5486,6 +5727,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -5524,8 +5778,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5539,6 +5795,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index dc736d8273..24153b356f 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -578,8 +602,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -603,6 +629,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -615,16 +651,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -654,8 +680,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -669,6 +697,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -826,8 +862,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -851,19 +889,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -883,6 +908,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -921,8 +959,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -936,6 +976,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1129,8 +1177,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1154,19 +1204,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1186,6 +1223,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1224,8 +1274,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1239,6 +1291,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1299,8 +1359,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1324,19 +1386,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1356,6 +1405,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1394,14 +1456,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1536,8 +1608,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1561,19 +1635,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1593,6 +1654,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1631,8 +1705,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1646,6 +1722,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1706,8 +1790,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1731,19 +1817,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1763,6 +1836,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1801,14 +1887,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2077,8 +2173,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2102,19 +2200,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2134,6 +2219,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2172,8 +2270,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2187,6 +2287,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2247,8 +2355,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2272,19 +2382,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2304,6 +2401,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2342,14 +2452,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index e711add852..4a21dccfda 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -578,8 +602,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -603,6 +629,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -615,16 +651,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -654,8 +680,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -669,6 +697,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -826,8 +862,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -851,19 +889,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -883,6 +908,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -921,8 +959,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -936,6 +976,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1129,8 +1177,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1154,19 +1204,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1186,6 +1223,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1224,8 +1274,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1239,6 +1291,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1299,8 +1359,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1324,19 +1386,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1356,6 +1405,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1394,14 +1456,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1536,8 +1608,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1561,19 +1635,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1593,6 +1654,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1631,8 +1705,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1646,6 +1722,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1706,8 +1790,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1731,19 +1817,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1763,6 +1836,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1801,14 +1887,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2077,8 +2173,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2102,19 +2200,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2134,6 +2219,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2172,8 +2270,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2187,6 +2287,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2247,8 +2355,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2272,19 +2382,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2304,6 +2401,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2342,14 +2452,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 55da678be2..58d5563f8e 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -578,8 +602,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -603,6 +629,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -615,16 +651,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseDocument" - } - } - } } } }, @@ -654,8 +680,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -669,6 +697,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -826,8 +862,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -851,19 +889,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -883,6 +908,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -921,8 +959,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -936,6 +976,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1129,8 +1177,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1154,19 +1204,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1186,6 +1223,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1224,8 +1274,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1239,6 +1291,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1299,8 +1359,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1324,19 +1386,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1356,6 +1405,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1394,14 +1456,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1536,8 +1608,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1561,19 +1635,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1593,6 +1654,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1631,8 +1705,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1646,6 +1722,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1706,8 +1790,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1731,19 +1817,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1763,6 +1836,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1801,14 +1887,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2077,8 +2173,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2102,19 +2200,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2134,6 +2219,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2172,8 +2270,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2187,6 +2287,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2247,8 +2355,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2272,19 +2382,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2304,6 +2401,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2342,14 +2452,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/OpenApiClientTests.csproj b/test/OpenApiClientTests/OpenApiClientTests.csproj index e849696f0c..d14b84422c 100644 --- a/test/OpenApiClientTests/OpenApiClientTests.csproj +++ b/test/OpenApiClientTests/OpenApiClientTests.csproj @@ -2,6 +2,7 @@ net8.0 + enable @@ -28,56 +29,56 @@ OpenApiClient OpenApiClient.cs NSwagCSharp - /GenerateClientInterfaces:true /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateClientInterfaces:true /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions OpenApiClientTests.NamingConventions.KebabCase.GeneratedCode KebabCaseClient KebabCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions OpenApiClientTests.NamingConventions.CamelCase.GeneratedCode CamelCaseClient CamelCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions OpenApiClientTests.NamingConventions.PascalCase.GeneratedCode PascalCaseClient PascalCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions NrtOffMsvOffClient NrtOffMsvOffClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOff.ModelStateValidationOff.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false NrtOffMsvOnClient NrtOffMsvOnClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOff.ModelStateValidationOn.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false NrtOnMsvOffClient NrtOnMsvOffClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOn.ModelStateValidationOff.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true NrtOnMsvOnClient NrtOnMsvOnClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOn.ModelStateValidationOn.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 892cb4141b..7610003263 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1128,8 +1176,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1153,19 +1203,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1185,6 +1222,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1223,8 +1273,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1238,6 +1290,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1298,8 +1358,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1323,19 +1385,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1355,6 +1404,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1393,14 +1455,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1535,8 +1607,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1560,19 +1634,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1592,6 +1653,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1630,8 +1704,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1645,6 +1721,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1705,8 +1789,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1730,19 +1816,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1762,6 +1835,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1800,14 +1886,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2076,8 +2172,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2101,19 +2199,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2133,6 +2218,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2171,8 +2269,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2186,6 +2286,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2246,8 +2354,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2271,19 +2381,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2303,6 +2400,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2341,14 +2451,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index e2bc3858fb..0aad826714 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1128,8 +1176,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1153,19 +1203,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1185,6 +1222,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1223,8 +1273,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1238,6 +1290,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1298,8 +1358,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1323,19 +1385,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1355,6 +1404,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1393,14 +1455,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1535,8 +1607,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1560,19 +1634,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1592,6 +1653,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1630,8 +1704,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1645,6 +1721,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1705,8 +1789,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1730,19 +1816,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1762,6 +1835,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1800,14 +1886,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2076,8 +2172,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2101,19 +2199,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2133,6 +2218,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2171,8 +2269,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2186,6 +2286,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2246,8 +2354,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2271,19 +2381,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2303,6 +2400,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2341,14 +2451,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 2108e79321..b7876ec552 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -994,8 +1042,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1019,19 +1069,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1051,6 +1088,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1089,8 +1139,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1104,6 +1156,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1164,8 +1224,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1189,19 +1251,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1221,6 +1270,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1259,14 +1321,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1401,8 +1473,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1426,19 +1500,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1458,6 +1519,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1496,8 +1570,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1511,6 +1587,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1571,8 +1655,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1596,19 +1682,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1628,6 +1701,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1666,14 +1752,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1808,8 +1904,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1833,19 +1931,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1865,6 +1950,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1903,8 +2001,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1918,6 +2018,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1978,8 +2086,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2003,19 +2113,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2035,6 +2132,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2073,14 +2183,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2215,8 +2335,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2240,19 +2362,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2272,6 +2381,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2310,8 +2432,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2325,6 +2449,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2385,8 +2517,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2410,19 +2544,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2442,6 +2563,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2480,14 +2614,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2756,8 +2900,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2781,19 +2927,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2813,6 +2946,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2851,8 +2997,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2866,6 +3014,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2926,8 +3082,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2951,19 +3109,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2983,6 +3128,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3021,14 +3179,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 56570d5d6f..4ad5cb47bb 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -994,8 +1042,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1019,19 +1069,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1051,6 +1088,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1089,8 +1139,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1104,6 +1156,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1164,8 +1224,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1189,19 +1251,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1221,6 +1270,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1259,14 +1321,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1401,8 +1473,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1426,19 +1500,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1458,6 +1519,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1496,8 +1570,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1511,6 +1587,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1571,8 +1655,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1596,19 +1682,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1628,6 +1701,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1666,14 +1752,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1808,8 +1904,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1833,19 +1931,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1865,6 +1950,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1903,8 +2001,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1918,6 +2018,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1978,8 +2086,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2003,19 +2113,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2035,6 +2132,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2073,14 +2183,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2215,8 +2335,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2240,19 +2362,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2272,6 +2381,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2310,8 +2432,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2325,6 +2449,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2385,8 +2517,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2410,19 +2544,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2442,6 +2563,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2480,14 +2614,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2756,8 +2900,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2781,19 +2927,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2813,6 +2946,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2851,8 +2997,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2866,6 +3014,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2926,8 +3082,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2951,19 +3109,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2983,6 +3128,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3021,14 +3179,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj index d2fae2dc01..7f65f075e3 100644 --- a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj +++ b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj @@ -2,6 +2,7 @@ net8.0 + enable @@ -28,7 +29,7 @@ QueryStringsClient QueryStringsClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 0ea4b40635..20ffda135a 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -985,8 +1033,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1010,6 +1060,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -1022,16 +1082,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } } } }, @@ -1061,8 +1111,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1076,6 +1128,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1233,8 +1293,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1258,19 +1320,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1290,6 +1339,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1328,8 +1390,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1343,6 +1407,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1536,8 +1608,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1561,19 +1635,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1593,6 +1654,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1631,8 +1705,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1646,6 +1722,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1706,8 +1790,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1731,19 +1817,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1763,6 +1836,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1801,14 +1887,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2077,8 +2173,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2102,19 +2200,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2134,6 +2219,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2172,8 +2270,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2187,6 +2287,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2247,8 +2355,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2272,19 +2382,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2304,6 +2401,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2342,14 +2452,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2484,8 +2604,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2509,19 +2631,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2541,6 +2650,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2579,8 +2701,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2594,6 +2718,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2654,8 +2786,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2679,19 +2813,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2711,6 +2832,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2749,14 +2883,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index 3b0df75eb4..9cf4e5ab8b 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -36,8 +36,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -61,6 +63,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -73,16 +85,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -112,8 +114,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -127,6 +131,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -284,8 +296,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -309,19 +323,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -341,6 +342,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -379,8 +393,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -394,6 +410,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -587,8 +611,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -612,19 +638,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -644,6 +657,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -682,8 +708,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -697,6 +725,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -757,8 +793,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -782,19 +820,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -814,6 +839,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -852,14 +890,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -1119,8 +1167,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1144,6 +1194,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -1156,16 +1216,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -1195,8 +1245,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1210,6 +1262,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1367,8 +1427,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1392,19 +1454,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1424,6 +1473,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1462,8 +1524,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1477,6 +1541,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1670,8 +1742,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1695,19 +1769,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1727,6 +1788,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1765,8 +1839,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1780,6 +1856,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -1840,8 +1924,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -1865,19 +1951,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -1897,6 +1970,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -1935,14 +2021,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2211,8 +2307,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2236,19 +2334,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2268,6 +2353,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2306,8 +2404,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2321,6 +2421,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2381,8 +2489,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2406,19 +2516,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -2438,6 +2535,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -2476,14 +2586,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -2743,8 +2863,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2768,6 +2890,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -2780,16 +2912,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -2819,8 +2941,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -2834,6 +2958,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -2991,8 +3123,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3016,19 +3150,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3048,6 +3169,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3086,8 +3220,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3101,6 +3237,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3294,8 +3438,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3319,19 +3465,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3351,6 +3484,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3389,8 +3535,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3404,6 +3552,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3464,8 +3620,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3489,19 +3647,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3521,6 +3666,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3559,16 +3717,26 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, + "ETag": { + "description": "ETag identifying the version of the fetched resource.", "required": true, "schema": { "type": "string" @@ -3701,8 +3869,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3726,19 +3896,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3758,6 +3915,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3796,8 +3966,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3811,6 +3983,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -3871,8 +4051,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -3896,19 +4078,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -3928,6 +4097,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -3966,14 +4148,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -4242,8 +4434,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4267,19 +4461,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4299,6 +4480,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4337,8 +4531,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4352,6 +4548,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -4412,8 +4616,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4437,19 +4643,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4469,6 +4662,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4507,14 +4713,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -4783,8 +4999,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4808,19 +5026,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -4840,6 +5045,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -4878,8 +5096,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4893,6 +5113,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -4953,8 +5181,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -4978,19 +5208,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -5010,6 +5227,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -5048,14 +5278,24 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { "200": { "description": "The operation completed successfully.", "headers": { + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 + }, "ETag": { "description": "ETag identifying the version of the fetched resource.", "required": true, @@ -5181,8 +5421,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5206,6 +5448,16 @@ } } }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } + }, "304": { "description": "The resource was not modified.", "headers": { @@ -5218,16 +5470,6 @@ "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } } - }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } } } }, @@ -5257,8 +5499,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5272,6 +5516,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -5429,8 +5681,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5454,19 +5708,6 @@ } } }, - "304": { - "description": "The resource was not modified.", - "headers": { - "ETag": { - "description": "ETag identifying the version of the fetched resource.", - "required": true, - "schema": { - "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - } - } - }, "400": { "description": "The query string is invalid.", "content": { @@ -5486,6 +5727,19 @@ } } } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "ETag identifying the version of the fetched resource.", + "required": true, + "schema": { + "type": "string" + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } + } } } }, @@ -5524,8 +5778,10 @@ "in": "header", "description": "ETag identifying the version of the requested resource.", "schema": { - "type": "string" - } + "type": "string", + "nullable": true + }, + "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" } ], "responses": { @@ -5539,6 +5795,14 @@ "type": "string" }, "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + }, + "Content-Length": { + "description": "Size of the response body in bytes", + "required": true, + "schema": { + "type": "integer" + }, + "example": 891 } } }, @@ -6181,7 +6445,7 @@ }, "meta": { "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "nullable": true } }, From 056cc8241940fc377ea4b767d36e3f8abe383509 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Sat, 17 Feb 2024 13:28:08 -0500 Subject: [PATCH 13/36] Address PR comments --- .../JsonApiDotNetCoreExample.json | 588 ++++++-------- .../ExampleApiClient.cs | 10 + .../JsonApiDotNetCoreExampleClient.csproj | 3 +- .../JsonApiDotNetCoreExampleClient/Program.cs | 25 +- .../{Exceptions => }/ApiException.cs | 2 +- .../ApiResponse.cs | 63 +- .../JsonApiOperationDocumentationFilter.cs | 27 +- .../LegacyClient/RequestTests.cs | 12 +- .../LegacyClient/ResponseTests.cs | 19 +- .../LegacyClient/swagger.g.json | 720 +++++++----------- .../CamelCase/swagger.g.json | 328 ++++---- .../KebabCase/swagger.g.json | 328 ++++---- .../PascalCase/swagger.g.json | 328 ++++---- .../OpenApiClientTests.csproj | 16 +- .../ModelStateValidationOff/swagger.g.json | 324 ++++---- .../ModelStateValidationOn/swagger.g.json | 324 ++++---- .../ModelStateValidationOff/swagger.g.json | 452 +++++------ .../ModelStateValidationOn/swagger.g.json | 452 +++++------ .../OpenApiEndToEndTests.csproj | 2 +- .../QueryStrings/ETagTests.cs | 76 ++ .../QueryStrings/FilterTests.cs | 40 +- .../QueryStrings/IncludeTests.cs | 51 +- .../QueryStrings/PaginationTests.cs | 34 +- .../QueryStrings/SortTests.cs | 26 +- .../QueryStrings/SparseFieldSetTests.cs | 59 +- .../QueryStrings/swagger.g.json | 392 ++++------ .../DocComments/DocCommentsTests.cs | 74 +- .../LegacyOpenApiIntegration/swagger.json | 720 +++++++----------- 28 files changed, 2351 insertions(+), 3144 deletions(-) rename src/JsonApiDotNetCore.OpenApi.Client/{Exceptions => }/ApiException.cs (95%) create mode 100644 test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index e8085693be..e9f0a2da94 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found people, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The person was successfully created, which resulted in additional changes. The newly created person is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found person.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found todoItems, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1174,12 +1150,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1187,12 +1162,11 @@ "description": "Successfully returns the found todoItems, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1227,12 +1201,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1271,12 +1244,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1284,15 +1256,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1305,12 +1276,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1356,12 +1326,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1369,12 +1338,11 @@ "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1409,12 +1377,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1453,12 +1420,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1466,7 +1432,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1474,12 +1440,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1487,12 +1452,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1730,12 +1694,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1743,12 +1706,11 @@ "description": "Successfully returns the found tags, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1773,12 +1735,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1808,12 +1769,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1821,15 +1781,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1842,12 +1801,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1896,10 +1854,10 @@ "description": "The tag was successfully created, which resulted in additional changes. The newly created tag is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -1990,12 +1948,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2003,12 +1960,11 @@ "description": "Successfully returns the found tag.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2043,12 +1999,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2087,12 +2042,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2100,15 +2054,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2121,12 +2074,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2305,12 +2257,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2318,12 +2269,11 @@ "description": "Successfully returns the found todoItems, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2358,12 +2308,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2402,12 +2351,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2415,15 +2363,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2436,12 +2383,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2487,12 +2433,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2500,12 +2445,11 @@ "description": "Successfully returns the found todoItem identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2540,12 +2484,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2584,12 +2527,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2597,7 +2539,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2605,12 +2547,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2618,12 +2559,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2861,12 +2801,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2874,12 +2813,11 @@ "description": "Successfully returns the found todoItems, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2904,12 +2842,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2939,12 +2876,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2952,15 +2888,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2973,12 +2908,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3027,10 +2961,10 @@ "description": "The todoItem was successfully created, which resulted in additional changes. The newly created todoItem is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -3121,12 +3055,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3134,12 +3067,11 @@ "description": "Successfully returns the found todoItem.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3174,12 +3106,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3218,12 +3149,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3231,15 +3161,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3252,12 +3181,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3436,12 +3364,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3449,12 +3376,11 @@ "description": "Successfully returns the found person, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3489,12 +3415,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3533,12 +3458,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3546,15 +3470,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3567,12 +3490,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3618,12 +3540,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3631,12 +3552,11 @@ "description": "Successfully returns the found person identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3671,12 +3591,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3715,12 +3634,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3728,7 +3646,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3736,12 +3654,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3749,12 +3666,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3867,12 +3783,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3880,12 +3795,11 @@ "description": "Successfully returns the found person, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3920,12 +3834,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3964,12 +3877,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3977,15 +3889,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3998,12 +3909,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4049,12 +3959,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4062,12 +3971,11 @@ "description": "Successfully returns the found person identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4102,12 +4010,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4146,12 +4053,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4159,7 +4065,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4167,12 +4073,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4180,12 +4085,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4298,12 +4202,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4311,12 +4214,11 @@ "description": "Successfully returns the found tags, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4351,12 +4253,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4395,12 +4296,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4408,15 +4308,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4429,12 +4328,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4480,12 +4378,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4493,12 +4390,11 @@ "description": "Successfully returns the found tag identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4533,12 +4429,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4577,12 +4472,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4590,7 +4484,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4598,12 +4492,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4611,12 +4504,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs b/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs index e55e79d97e..c804f0708c 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs @@ -1,6 +1,8 @@ using JetBrains.Annotations; using JsonApiDotNetCore.OpenApi.Client; using Newtonsoft.Json; +using NSwag; +using NSwag.CodeGeneration; namespace JsonApiDotNetCoreExampleClient; @@ -16,3 +18,11 @@ partial void UpdateJsonSerializerSettings(JsonSerializerSettings settings) #endif } } + +public class TestParameterNameGenerator : IParameterNameGenerator +{ + public string Generate(OpenApiParameter parameter, IEnumerable allParameters) + { + throw new NotImplementedException("TTEESSST"); + } +} diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index a2795160c1..7a55fb2b78 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -22,11 +22,12 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + - /GenerateExceptionClasses:false /WrapResponses:true /ResponseClass:JsonApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /ParameterNameGenerator:JsonApiDotNetCoreExampleClient.TestParameterNameGenerator diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs index d3562f1e2a..2e3a9488af 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs @@ -1,7 +1,6 @@ +using System.Net; using JsonApiDotNetCore.OpenApi.Client; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; using JsonApiDotNetCoreExampleClient; -using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; #if DEBUG @@ -15,19 +14,17 @@ var apiClient = new ExampleApiClient(httpClient); -JsonApiResponse getResponse = await GetPersonCollectionAsync(apiClient); +ApiResponse getResponse1 = await GetPersonCollectionAsync(apiClient, null); +ApiResponse getResponse2 = await GetPersonCollectionAsync(apiClient, getResponse1.Headers[HeaderNames.ETag].First()); -try -{ - getResponse = await GetPersonCollectionAsync(apiClient, getResponse.Headers[HeaderNames.ETag].First()); -} -catch (ApiException exception) when (exception.StatusCode == StatusCodes.Status304NotModified) +if (getResponse2.StatusCode == (int)HttpStatusCode.NotModified) { + // getResponse2.Result is null. } -foreach (PersonDataInResponse person in getResponse.Result.Data) +foreach (PersonDataInResponse person in getResponse1.Result!.Data) { - PrintPerson(person, getResponse.Result.Included); + PrintPerson(person, getResponse1.Result.Included); } var patchRequest = new PersonPatchRequestDocument @@ -52,17 +49,15 @@ Console.WriteLine("Press any key to close."); Console.ReadKey(); -#pragma warning disable AV1553 -static Task> GetPersonCollectionAsync(ExampleApiClient apiClient, string? ifNoneMatch = null) -#pragma warning restore AV1553 +static Task> GetPersonCollectionAsync(ExampleApiClient apiClient, string? ifNoneMatch) { - return apiClient.GetPersonCollectionAsync(new Dictionary + return ApiResponse.TranslateAsync(() => apiClient.GetPersonCollectionAsync(new Dictionary { ["filter"] = "has(assignedTodoItems)", ["sort"] = "-lastName", ["page[size]"] = "5", ["include"] = "assignedTodoItems.tags" - }, ifNoneMatch); + }, ifNoneMatch)); } static void PrintPerson(PersonDataInResponse person, ICollection includes) diff --git a/src/JsonApiDotNetCore.OpenApi.Client/Exceptions/ApiException.cs b/src/JsonApiDotNetCore.OpenApi.Client/ApiException.cs similarity index 95% rename from src/JsonApiDotNetCore.OpenApi.Client/Exceptions/ApiException.cs rename to src/JsonApiDotNetCore.OpenApi.Client/ApiException.cs index 7b89e5cc6a..d05aaeb111 100644 --- a/src/JsonApiDotNetCore.OpenApi.Client/Exceptions/ApiException.cs +++ b/src/JsonApiDotNetCore.OpenApi.Client/ApiException.cs @@ -3,7 +3,7 @@ // We cannot rely on generating ApiException as soon as we are generating multiple clients, see https://github.com/RicoSuter/NSwag/issues/2839#issuecomment-776647377. // Instead, we configure NSwag to point to the exception below in the generated code. -namespace JsonApiDotNetCore.OpenApi.Client.Exceptions; +namespace JsonApiDotNetCore.OpenApi.Client; [UsedImplicitly(ImplicitUseTargetFlags.Members)] public class ApiException(string message, int statusCode, string? response, IReadOnlyDictionary> headers, Exception? innerException) diff --git a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs index c144177d22..dd789f6617 100644 --- a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs +++ b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs @@ -1,13 +1,21 @@ +using System.Net; using JetBrains.Annotations; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; - -#pragma warning disable AV1008 // Class should not be static namespace JsonApiDotNetCore.OpenApi.Client; [PublicAPI] -public static class ApiResponse +public class ApiResponse { + public int StatusCode { get; private set; } + + public IReadOnlyDictionary> Headers { get; private set; } + + public ApiResponse(int statusCode, IReadOnlyDictionary> headers) + { + StatusCode = statusCode; + Headers = headers; + } + public static async Task TranslateAsync(Func> operation) where TResponse : class { @@ -17,7 +25,7 @@ public static class ApiResponse { return await operation().ConfigureAwait(false); } - catch (ApiException exception) when (exception.StatusCode == 204) + catch (ApiException exception) when (exception.StatusCode is (int)HttpStatusCode.NoContent or (int)HttpStatusCode.NotModified) { // Workaround for https://github.com/RicoSuter/NSwag/issues/2499 return null; @@ -32,9 +40,52 @@ public static async Task TranslateAsync(Func operation) { await operation().ConfigureAwait(false); } - catch (ApiException exception) when (exception.StatusCode == 204) + catch (ApiException exception) when (exception.StatusCode is (int)HttpStatusCode.NoContent or (int)HttpStatusCode.NotModified) + { + // Workaround for https://github.com/RicoSuter/NSwag/issues/2499 + } + } + + public static async Task> TranslateAsync(Func>> operation) + where TResult : class + { + ArgumentGuard.NotNull(operation); + + try + { + return (await operation().ConfigureAwait(false))!; + } + catch (ApiException exception) when (exception.StatusCode is (int)HttpStatusCode.NoContent or (int)HttpStatusCode.NotModified) + { + // Workaround for https://github.com/RicoSuter/NSwag/issues/2499 + return new ApiResponse(exception.StatusCode, exception.Headers, null); + } + } + + public static async Task TranslateAsync(Func> operation) + { + ArgumentGuard.NotNull(operation); + + try + { + return await operation().ConfigureAwait(false); + } + catch (ApiException exception) when (exception.StatusCode is (int)HttpStatusCode.NoContent or (int)HttpStatusCode.NotModified) { // Workaround for https://github.com/RicoSuter/NSwag/issues/2499 + return new ApiResponse(exception.StatusCode, exception.Headers); } } } + +[PublicAPI] +public class ApiResponse : ApiResponse +{ + public TResult Result { get; private set; } + + public ApiResponse(int statusCode, IReadOnlyDictionary> headers, TResult result) + : base(statusCode, headers) + { + Result = result; + } +} diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 7d1c512f97..52d3e0c5cf 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -182,7 +182,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res } AddQueryStringParameters(operation, false); - AddHeaderParameterIfNoneMatch(operation); + AddRequestHeaderIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); } else if (operation.Parameters.Count == 1) @@ -210,7 +210,7 @@ private static void ApplyGetPrimary(OpenApiOperation operation, ResourceType res SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularName} to retrieve."); AddQueryStringParameters(operation, false); - AddHeaderParameterIfNoneMatch(operation); + AddRequestHeaderIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularName} does not exist."); } @@ -313,7 +313,7 @@ relationship is HasOneAttribute SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {rightName} to retrieve."); AddQueryStringParameters(operation, false); - AddHeaderParameterIfNoneMatch(operation); + AddRequestHeaderIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularLeftName} does not exist."); } @@ -355,7 +355,7 @@ relationship is HasOneAttribute SetParameterDescription(operation.Parameters[0], $"The identifier of the {singularLeftName} whose related {singularRightName} {ident} to retrieve."); AddQueryStringParameters(operation, true); - AddHeaderParameterIfNoneMatch(operation); + AddRequestHeaderIfNoneMatch(operation); SetResponseDescription(operation.Responses, HttpStatusCode.BadRequest, TextQueryStringBad); SetResponseDescription(operation.Responses, HttpStatusCode.NotFound, $"The {singularLeftName} does not exist."); } @@ -470,13 +470,12 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus response.Headers[HeaderNames.ETag] = new OpenApiHeader { - Description = "ETag identifying the version of the fetched resource.", + Description = "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", Required = true, Schema = new OpenApiSchema { Type = "string" - }, - Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") + } }; } @@ -486,7 +485,7 @@ private static void SetResponseHeaderContentLength(OpenApiResponses responses, H response.Headers[HeaderNames.ContentLength] = new OpenApiHeader { - Description = "Size of the response body in bytes", + Description = "Size of the HTTP response body, in bytes.", Required = true, Schema = new OpenApiSchema { @@ -502,11 +501,11 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt response.Headers[HeaderNames.Location] = new OpenApiHeader { - Description = "Location of the newly created resource.", + Description = "The URL at which the newly created JSON:API resource can be retrieved.", Required = true, Schema = new OpenApiSchema { - Type = "string" + Type = "uri" } }; } @@ -555,20 +554,18 @@ private static void AddQueryStringParameters(OpenApiOperation operation, bool is }); } - private static void AddHeaderParameterIfNoneMatch(OpenApiOperation operation) + private static void AddRequestHeaderIfNoneMatch(OpenApiOperation operation) { operation.Parameters.Add(new OpenApiParameter { In = ParameterLocation.Header, Name = "If-None-Match", - Description = "ETag identifying the version of the requested resource.", - Required = false, + Description = "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", Schema = new OpenApiSchema { Type = "string", Nullable = true - }, - Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") + } }); } } diff --git a/test/OpenApiClientTests/LegacyClient/RequestTests.cs b/test/OpenApiClientTests/LegacyClient/RequestTests.cs index 4c3dd0ef13..7a8edc786f 100644 --- a/test/OpenApiClientTests/LegacyClient/RequestTests.cs +++ b/test/OpenApiClientTests/LegacyClient/RequestTests.cs @@ -23,7 +23,7 @@ public async Task Getting_resource_collection_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCollectionAsync()); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCollectionAsync(null, null)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -43,7 +43,7 @@ public async Task Getting_resource_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightAsync(flightId)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightAsync(flightId, null, null)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -269,7 +269,7 @@ public async Task Getting_secondary_resource_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserAsync(flightId)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserAsync(flightId, null, null)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -289,7 +289,7 @@ public async Task Getting_secondary_resources_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersAsync(flightId)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersAsync(flightId, null, null)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -309,7 +309,7 @@ public async Task Getting_ToOne_relationship_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserRelationshipAsync(flightId)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightPurserRelationshipAsync(flightId, null, null)); // Assert wrapper.Request.ShouldNotBeNull(); @@ -368,7 +368,7 @@ public async Task Getting_ToMany_relationship_produces_expected_request() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId)); + _ = await ApiResponse.TranslateAsync(() => apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId, null, null)); // Assert wrapper.Request.ShouldNotBeNull(); diff --git a/test/OpenApiClientTests/LegacyClient/ResponseTests.cs b/test/OpenApiClientTests/LegacyClient/ResponseTests.cs index c216e3c0c0..a93789dea1 100644 --- a/test/OpenApiClientTests/LegacyClient/ResponseTests.cs +++ b/test/OpenApiClientTests/LegacyClient/ResponseTests.cs @@ -2,7 +2,6 @@ using System.Net; using FluentAssertions; using JsonApiDotNetCore.OpenApi.Client; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; using OpenApiClientTests.LegacyClient.GeneratedCode; using TestBuildingBlocks; using Xunit; @@ -99,7 +98,7 @@ public async Task Getting_resource_collection_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightCollectionResponseDocument document = await apiClient.GetFlightCollectionAsync(); + FlightCollectionResponseDocument document = await apiClient.GetFlightCollectionAsync(null, null); // Assert document.Jsonapi.Should().BeNull(); @@ -180,7 +179,7 @@ public async Task Getting_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightPrimaryResponseDocument document = await apiClient.GetFlightAsync(flightId); + FlightPrimaryResponseDocument document = await apiClient.GetFlightAsync(flightId, null, null); // Assert document.Jsonapi.Should().BeNull(); @@ -218,7 +217,7 @@ public async Task Getting_unknown_resource_translates_error_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - Func> action = () => apiClient.GetFlightAsync(flightId); + Func> action = () => apiClient.GetFlightAsync(flightId, null, null); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; @@ -447,7 +446,7 @@ public async Task Getting_secondary_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightPurserAsync(flightId); + FlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightPurserAsync(flightId, null, null); // Assert document.Data.Should().NotBeNull(); @@ -479,7 +478,7 @@ public async Task Getting_nullable_secondary_resource_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - NullableFlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightBackupPurserAsync(flightId); + NullableFlightAttendantSecondaryResponseDocument document = await apiClient.GetFlightBackupPurserAsync(flightId, null, null); // Assert document.Data.Should().BeNull(); @@ -505,7 +504,7 @@ public async Task Getting_secondary_resources_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersAsync(flightId); + FlightAttendantCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersAsync(flightId, null, null); // Assert document.Data.Should().BeEmpty(); @@ -531,7 +530,7 @@ public async Task Getting_nullable_ToOne_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - NullableFlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightBackupPurserRelationshipAsync(flightId); + NullableFlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightBackupPurserRelationshipAsync(flightId, null, null); // Assert document.Data.Should().BeNull(); @@ -561,7 +560,7 @@ public async Task Getting_ToOne_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightPurserRelationshipAsync(flightId); + FlightAttendantIdentifierResponseDocument document = await apiClient.GetFlightPurserRelationshipAsync(flightId, null, null); // Assert document.Data.Should().NotBeNull(); @@ -617,7 +616,7 @@ public async Task Getting_ToMany_relationship_translates_response() IOpenApiClient apiClient = new OpenApiClient(wrapper.HttpClient); // Act - FlightAttendantIdentifierCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId); + FlightAttendantIdentifierCollectionResponseDocument document = await apiClient.GetFlightCabinCrewMembersRelationshipAsync(flightId, null, null); // Assert document.Data.Should().HaveCount(2); diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index 3df23256ea..2df167a016 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found airplanes, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found airplane.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1165,12 +1141,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1178,12 +1153,11 @@ "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1208,12 +1182,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1243,12 +1216,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1256,15 +1228,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1277,12 +1248,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1331,10 +1301,10 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -1425,12 +1395,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1438,12 +1407,11 @@ "description": "Successfully returns the found flight-attendant.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1478,12 +1446,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1522,12 +1489,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1535,15 +1501,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1556,12 +1521,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1740,12 +1704,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1753,12 +1716,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1793,12 +1755,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1837,12 +1798,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1850,15 +1810,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1871,12 +1830,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1922,12 +1880,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1935,12 +1892,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1975,12 +1931,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2019,12 +1974,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2032,7 +1986,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2040,12 +1994,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2053,12 +2006,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2305,12 +2257,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2318,12 +2269,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2358,12 +2308,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2402,12 +2351,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2415,15 +2363,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2436,12 +2383,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2487,12 +2433,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2500,12 +2445,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2540,12 +2484,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2584,12 +2527,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2597,7 +2539,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2605,12 +2547,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2618,12 +2559,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2861,12 +2801,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2874,12 +2813,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2904,12 +2842,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2939,12 +2876,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2952,15 +2888,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2973,12 +2908,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3027,10 +2961,10 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -3121,12 +3055,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3134,12 +3067,11 @@ "description": "Successfully returns the found flight.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3174,12 +3106,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3218,12 +3149,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3231,15 +3161,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3252,12 +3181,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3436,12 +3364,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3449,12 +3376,11 @@ "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3489,12 +3415,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3533,12 +3458,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3546,15 +3470,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3567,12 +3490,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3618,12 +3540,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3631,12 +3552,11 @@ "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3671,12 +3591,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3715,12 +3634,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3728,7 +3646,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3736,12 +3654,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3749,12 +3666,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3867,12 +3783,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3880,12 +3795,11 @@ "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3920,12 +3834,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3964,12 +3877,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3977,15 +3889,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3998,12 +3909,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4049,12 +3959,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4062,12 +3971,11 @@ "description": "Successfully returns the found flight-attendant identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4102,12 +4010,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4146,12 +4053,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4159,7 +4065,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4167,12 +4073,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4180,12 +4085,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4432,12 +4336,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4445,12 +4348,11 @@ "description": "Successfully returns the found passengers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4485,12 +4387,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4529,12 +4430,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4542,15 +4442,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4563,12 +4462,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4614,12 +4512,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4627,12 +4524,11 @@ "description": "Successfully returns the found passenger identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4667,12 +4563,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4711,12 +4606,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4724,7 +4618,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4732,12 +4626,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4745,12 +4638,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4997,12 +4889,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5010,12 +4901,11 @@ "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5050,12 +4940,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5094,12 +4983,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5107,15 +4995,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5128,12 +5015,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5179,12 +5065,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5192,12 +5077,11 @@ "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5232,12 +5116,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5276,12 +5159,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5289,7 +5171,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5297,12 +5179,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5310,12 +5191,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5419,12 +5299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5432,12 +5311,11 @@ "description": "Successfully returns the found passengers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5462,12 +5340,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5497,12 +5374,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5510,15 +5386,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5531,12 +5406,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5585,10 +5459,10 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -5679,12 +5553,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5692,12 +5565,11 @@ "description": "Successfully returns the found passenger.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5732,12 +5604,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5776,12 +5647,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5789,15 +5659,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5810,12 +5679,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 24153b356f..9a02920241 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found staffMembers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The staffMember was successfully created, which resulted in additional changes. The newly created staffMember is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found staffMember.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -600,12 +588,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -613,12 +600,11 @@ "description": "Successfully returns the found supermarkets, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -643,12 +629,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -678,12 +663,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -691,15 +675,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -712,12 +695,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -766,10 +748,10 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -860,12 +842,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -873,12 +854,11 @@ "description": "Successfully returns the found supermarket.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -913,12 +893,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -957,12 +936,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -970,15 +948,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -991,12 +968,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1175,12 +1151,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1188,12 +1163,11 @@ "description": "Successfully returns the found staffMember, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1228,12 +1202,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1272,12 +1245,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1285,15 +1257,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1306,12 +1277,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1357,12 +1327,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1370,12 +1339,11 @@ "description": "Successfully returns the found staffMember identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1410,12 +1378,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1454,12 +1421,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1467,7 +1433,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1475,12 +1441,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1488,12 +1453,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1606,12 +1570,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1619,12 +1582,11 @@ "description": "Successfully returns the found staffMembers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1659,12 +1621,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1703,12 +1664,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1716,15 +1676,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1737,12 +1696,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1788,12 +1746,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1801,12 +1758,11 @@ "description": "Successfully returns the found staffMember identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1841,12 +1797,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1885,12 +1840,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1898,7 +1852,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1906,12 +1860,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1919,12 +1872,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2171,12 +2123,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2184,12 +2135,11 @@ "description": "Successfully returns the found staffMember, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2224,12 +2174,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2268,12 +2217,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2281,15 +2229,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2302,12 +2249,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2353,12 +2299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2366,12 +2311,11 @@ "description": "Successfully returns the found staffMember identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2406,12 +2350,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2450,12 +2393,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2463,7 +2405,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2471,12 +2413,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2484,12 +2425,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 4a21dccfda..dfda65853e 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found staff-members, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The staff-member was successfully created, which resulted in additional changes. The newly created staff-member is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found staff-member.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -600,12 +588,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -613,12 +600,11 @@ "description": "Successfully returns the found supermarkets, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -643,12 +629,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -678,12 +663,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -691,15 +675,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -712,12 +695,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -766,10 +748,10 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -860,12 +842,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -873,12 +854,11 @@ "description": "Successfully returns the found supermarket.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -913,12 +893,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -957,12 +936,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -970,15 +948,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -991,12 +968,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1175,12 +1151,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1188,12 +1163,11 @@ "description": "Successfully returns the found staff-member, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1228,12 +1202,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1272,12 +1245,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1285,15 +1257,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1306,12 +1277,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1357,12 +1327,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1370,12 +1339,11 @@ "description": "Successfully returns the found staff-member identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1410,12 +1378,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1454,12 +1421,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1467,7 +1433,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1475,12 +1441,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1488,12 +1453,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1606,12 +1570,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1619,12 +1582,11 @@ "description": "Successfully returns the found staff-members, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1659,12 +1621,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1703,12 +1664,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1716,15 +1676,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1737,12 +1696,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1788,12 +1746,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1801,12 +1758,11 @@ "description": "Successfully returns the found staff-member identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1841,12 +1797,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1885,12 +1840,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1898,7 +1852,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1906,12 +1860,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1919,12 +1872,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2171,12 +2123,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2184,12 +2135,11 @@ "description": "Successfully returns the found staff-member, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2224,12 +2174,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2268,12 +2217,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2281,15 +2229,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2302,12 +2249,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2353,12 +2299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2366,12 +2311,11 @@ "description": "Successfully returns the found staff-member identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2406,12 +2350,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2450,12 +2393,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2463,7 +2405,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2471,12 +2413,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2484,12 +2425,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 58d5563f8e..8de9a52a79 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found StaffMembers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The StaffMember was successfully created, which resulted in additional changes. The newly created StaffMember is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found StaffMember.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -600,12 +588,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -613,12 +600,11 @@ "description": "Successfully returns the found Supermarkets, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -643,12 +629,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -678,12 +663,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -691,15 +675,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -712,12 +695,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -766,10 +748,10 @@ "description": "The Supermarket was successfully created, which resulted in additional changes. The newly created Supermarket is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -860,12 +842,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -873,12 +854,11 @@ "description": "Successfully returns the found Supermarket.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -913,12 +893,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -957,12 +936,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -970,15 +948,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -991,12 +968,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1175,12 +1151,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1188,12 +1163,11 @@ "description": "Successfully returns the found StaffMember, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1228,12 +1202,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1272,12 +1245,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1285,15 +1257,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1306,12 +1277,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1357,12 +1327,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1370,12 +1339,11 @@ "description": "Successfully returns the found StaffMember identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1410,12 +1378,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1454,12 +1421,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1467,7 +1433,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1475,12 +1441,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1488,12 +1453,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1606,12 +1570,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1619,12 +1582,11 @@ "description": "Successfully returns the found StaffMembers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1659,12 +1621,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1703,12 +1664,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1716,15 +1676,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1737,12 +1696,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1788,12 +1746,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1801,12 +1758,11 @@ "description": "Successfully returns the found StaffMember identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1841,12 +1797,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1885,12 +1840,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1898,7 +1852,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1906,12 +1860,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1919,12 +1872,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2171,12 +2123,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2184,12 +2135,11 @@ "description": "Successfully returns the found StaffMember, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2224,12 +2174,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2268,12 +2217,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2281,15 +2229,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2302,12 +2249,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2353,12 +2299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2366,12 +2311,11 @@ "description": "Successfully returns the found StaffMember identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2406,12 +2350,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2450,12 +2393,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2463,7 +2405,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2471,12 +2413,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2484,12 +2425,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/OpenApiClientTests.csproj b/test/OpenApiClientTests/OpenApiClientTests.csproj index d14b84422c..4a7ba6b838 100644 --- a/test/OpenApiClientTests/OpenApiClientTests.csproj +++ b/test/OpenApiClientTests/OpenApiClientTests.csproj @@ -29,56 +29,56 @@ OpenApiClient OpenApiClient.cs NSwagCSharp - /GenerateClientInterfaces:true /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateClientInterfaces:true /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client OpenApiClientTests.NamingConventions.KebabCase.GeneratedCode KebabCaseClient KebabCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client OpenApiClientTests.NamingConventions.CamelCase.GeneratedCode CamelCaseClient CamelCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client OpenApiClientTests.NamingConventions.PascalCase.GeneratedCode PascalCaseClient PascalCaseClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client NrtOffMsvOffClient NrtOffMsvOffClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOff.ModelStateValidationOff.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:false NrtOffMsvOnClient NrtOffMsvOnClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOff.ModelStateValidationOn.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:false + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:false NrtOnMsvOffClient NrtOnMsvOffClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOn.ModelStateValidationOff.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:true NrtOnMsvOnClient NrtOnMsvOnClient.cs NSwagCSharp OpenApiClientTests.ResourceFieldValidation.NullableReferenceTypesOn.ModelStateValidationOn.GeneratedCode - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:true diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 7610003263..42f5fae4c7 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found resources, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found resource.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1174,12 +1150,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1187,12 +1162,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1227,12 +1201,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1271,12 +1244,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1284,15 +1256,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1305,12 +1276,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1356,12 +1326,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1369,12 +1338,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1409,12 +1377,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1453,12 +1420,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1466,7 +1432,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1474,12 +1440,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1487,12 +1452,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1605,12 +1569,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1618,12 +1581,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1658,12 +1620,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1702,12 +1663,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1715,15 +1675,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1736,12 +1695,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1787,12 +1745,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1800,12 +1757,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1840,12 +1796,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1884,12 +1839,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1897,7 +1851,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1905,12 +1859,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1918,12 +1871,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2170,12 +2122,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2183,12 +2134,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2223,12 +2173,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2267,12 +2216,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2280,15 +2228,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2301,12 +2248,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2352,12 +2298,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2365,12 +2310,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2405,12 +2349,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2449,12 +2392,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2462,7 +2404,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2470,12 +2412,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2483,12 +2424,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 0aad826714..28e738af2f 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found resources, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found resource.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1174,12 +1150,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1187,12 +1162,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1227,12 +1201,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1271,12 +1244,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1284,15 +1256,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1305,12 +1276,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1356,12 +1326,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1369,12 +1338,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1409,12 +1377,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1453,12 +1420,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1466,7 +1432,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1474,12 +1440,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1487,12 +1452,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1605,12 +1569,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1618,12 +1581,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1658,12 +1620,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1702,12 +1663,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1715,15 +1675,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1736,12 +1695,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1787,12 +1745,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1800,12 +1757,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1840,12 +1796,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1884,12 +1839,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1897,7 +1851,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1905,12 +1859,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1918,12 +1871,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2170,12 +2122,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2183,12 +2134,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2223,12 +2173,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2267,12 +2216,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2280,15 +2228,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2301,12 +2248,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2352,12 +2298,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2365,12 +2310,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2405,12 +2349,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2449,12 +2392,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2462,7 +2404,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2470,12 +2412,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2483,12 +2424,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index b7876ec552..c231ce9f4a 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found resources, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found resource.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1040,12 +1016,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1053,12 +1028,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1093,12 +1067,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1137,12 +1110,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1150,15 +1122,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1171,12 +1142,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1222,12 +1192,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1235,12 +1204,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1275,12 +1243,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1319,12 +1286,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1332,7 +1298,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1340,12 +1306,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1353,12 +1318,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1471,12 +1435,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1484,12 +1447,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1524,12 +1486,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1568,12 +1529,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1581,15 +1541,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1602,12 +1561,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1653,12 +1611,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1666,12 +1623,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1706,12 +1662,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1750,12 +1705,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1763,7 +1717,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1771,12 +1725,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1784,12 +1737,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1902,12 +1854,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1915,12 +1866,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1955,12 +1905,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1999,12 +1948,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2012,15 +1960,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2033,12 +1980,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2084,12 +2030,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2097,12 +2042,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2137,12 +2081,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2181,12 +2124,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2194,7 +2136,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2202,12 +2144,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2215,12 +2156,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2333,12 +2273,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2346,12 +2285,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2386,12 +2324,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2430,12 +2367,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2443,15 +2379,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2464,12 +2399,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2515,12 +2449,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2528,12 +2461,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2568,12 +2500,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2612,12 +2543,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2625,7 +2555,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2633,12 +2563,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2646,12 +2575,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2898,12 +2826,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2911,12 +2838,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2951,12 +2877,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2995,12 +2920,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3008,15 +2932,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3029,12 +2952,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3080,12 +3002,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3093,12 +3014,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3133,12 +3053,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3177,12 +3096,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3190,7 +3108,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3198,12 +3116,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3211,12 +3128,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 4ad5cb47bb..27b95c5d06 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found resources, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found resource.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1040,12 +1016,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1053,12 +1028,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1093,12 +1067,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1137,12 +1110,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1150,15 +1122,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1171,12 +1142,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1222,12 +1192,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1235,12 +1204,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1275,12 +1243,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1319,12 +1286,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1332,7 +1298,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1340,12 +1306,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1353,12 +1318,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1471,12 +1435,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1484,12 +1447,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1524,12 +1486,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1568,12 +1529,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1581,15 +1541,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1602,12 +1561,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1653,12 +1611,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1666,12 +1623,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1706,12 +1662,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1750,12 +1705,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1763,7 +1717,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1771,12 +1725,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1784,12 +1737,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1902,12 +1854,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1915,12 +1866,11 @@ "description": "Successfully returns the found empty, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1955,12 +1905,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1999,12 +1948,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2012,15 +1960,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2033,12 +1980,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2084,12 +2030,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2097,12 +2042,11 @@ "description": "Successfully returns the found empty identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2137,12 +2081,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2181,12 +2124,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2194,7 +2136,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2202,12 +2144,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2215,12 +2156,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2333,12 +2273,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2346,12 +2285,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2386,12 +2324,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2430,12 +2367,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2443,15 +2379,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2464,12 +2399,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2515,12 +2449,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2528,12 +2461,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2568,12 +2500,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2612,12 +2543,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2625,7 +2555,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2633,12 +2563,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2646,12 +2575,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2898,12 +2826,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2911,12 +2838,11 @@ "description": "Successfully returns the found empties, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2951,12 +2877,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2995,12 +2920,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3008,15 +2932,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3029,12 +2952,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3080,12 +3002,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3093,12 +3014,11 @@ "description": "Successfully returns the found empty identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3133,12 +3053,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3177,12 +3096,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3190,7 +3108,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3198,12 +3116,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3211,12 +3128,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj index 7f65f075e3..55c1be5f28 100644 --- a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj +++ b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj @@ -29,7 +29,7 @@ QueryStringsClient QueryStringsClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true diff --git a/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs b/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs new file mode 100644 index 0000000000..2a5e29d6dc --- /dev/null +++ b/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs @@ -0,0 +1,76 @@ +using System.Net; +using FluentAssertions; +using JsonApiDotNetCore.OpenApi.Client; +using Microsoft.Net.Http.Headers; +using OpenApiEndToEndTests.QueryStrings.GeneratedCode; +using OpenApiTests; +using OpenApiTests.QueryStrings; +using TestBuildingBlocks; +using Xunit; +using Xunit.Abstractions; + +namespace OpenApiEndToEndTests.QueryStrings; + +public sealed class ETagTests : IClassFixture, QueryStringsDbContext>> +{ + private readonly IntegrationTestContext, QueryStringsDbContext> _testContext; + private readonly ITestOutputHelper _testOutputHelper; + private readonly QueryStringFakers _fakers = new(); + + public ETagTests(IntegrationTestContext, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper) + { + _testContext = testContext; + _testOutputHelper = testOutputHelper; + + testContext.UseController(); + } + + [Fact] + public async Task Read_Read_Write_Read_Scenario() + { + // Arrange + Node node = _fakers.Node.Generate(); + node.Name = "Bob l'éponge"; + + await _testContext.RunOnDatabaseAsync(async dbContext => + { + await dbContext.ClearTableAsync(); + dbContext.Nodes.Add(node); + await dbContext.SaveChangesAsync(); + }); + + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new QueryStringsClient(httpClient, _testOutputHelper); + + // Act & Assert + ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!)); + response1.StatusCode.Should().Be((int)HttpStatusCode.OK); + response1.Headers.Should().ContainKey(HeaderNames.ETag); + string response1Etag = response1.Headers[HeaderNames.ETag].First(); + + ApiResponse response2 = + await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!, if_None_Match: response1Etag)); + + response2.StatusCode.Should().Be((int)HttpStatusCode.NotModified); + response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().Equal([response1Etag]); + + ApiResponse response3 = await ApiResponse.TranslateAsync(() => apiClient.PatchNodeAsync(node.StringId!, + body: new NodePatchRequestDocument + { + Data = new NodeDataInPatchRequest + { + Id = node.StringId!, + Attributes = new NodeAttributesInPatchRequest + { + Name = "Yann Le Gac" + } + } + })); + + response3.StatusCode.Should().Be((int)HttpStatusCode.NoContent); + + ApiResponse response4 = await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!)); + response4.StatusCode.Should().Be((int)HttpStatusCode.OK); + response4.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotEqual([response1Etag]); + } +} diff --git a/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs b/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs index 27e0be14fb..b65b1965c8 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs @@ -1,6 +1,6 @@ using System.Net; using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; +using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -48,15 +48,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString); + ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Data.ElementAt(0).Attributes.Name.Should().Be(nodes[1].Name); - response.Data.ElementAt(0).Attributes.Comment.Should().Be(nodes[1].Comment); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(nodes[1].Name); + response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(nodes[1].Comment); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] @@ -84,15 +84,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Data.ElementAt(0).Attributes.Name.Should().Be(node.Children.ElementAt(1).Name); - response.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(1).Comment); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(node.Children.ElementAt(1).Name); + response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(1).Comment); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] @@ -120,13 +120,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] diff --git a/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs b/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs index 3cd1348d52..f8c37a0df0 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs @@ -1,4 +1,5 @@ using FluentAssertions; +using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -46,15 +47,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString); + ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); // Assert - response.Data.ShouldHaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.StringId); + response.Result.Data.ShouldHaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.StringId); - response.Included.Should().HaveCount(2); - response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(0).StringId); - response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(1).StringId); + response.Result.Included.Should().HaveCount(2); + response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(0).StringId); + response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(1).StringId); } [Fact] @@ -81,15 +82,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); // Assert - response.Data.Id.Should().Be(node.StringId); + response.Result.Data.Id.Should().Be(node.StringId); - response.Included.Should().HaveCount(3); - response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(0).StringId); - response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(1).StringId); - response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values[0].StringId); + response.Result.Included.Should().HaveCount(3); + response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(0).StringId); + response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(1).StringId); + response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values[0].StringId); } [Fact] @@ -116,14 +117,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NameValuePairCollectionResponseDocument response = await apiClient.GetNodeValuesAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeValuesAsync(node.StringId!, queryString); // Assert - response.Data.ShouldHaveCount(2); + response.Result.Data.ShouldHaveCount(2); - response.Included.ShouldHaveCount(2); - response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.StringId); - response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Parent.StringId); + response.Result.Included.ShouldHaveCount(2); + response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.StringId); + response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Parent.StringId); } [Fact] @@ -150,15 +151,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NullableNodeSecondaryResponseDocument response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); // Assert - response.Data.ShouldNotBeNull(); - response.Data.Id.Should().Be(node.Parent.StringId); + response.Result.Data.ShouldNotBeNull(); + response.Result.Data.Id.Should().Be(node.Parent.StringId); - response.Included.Should().HaveCount(1); + response.Result.Included.Should().HaveCount(1); - NodeDataInResponse? include = response.Included.ElementAt(0).Should().BeOfType().Subject; + NodeDataInResponse? include = response.Result.Included.ElementAt(0).Should().BeOfType().Subject; include.Id.Should().Be(node.Parent.Parent.StringId); include.Attributes.Name.Should().Be(node.Parent.Parent.Name); } @@ -184,11 +185,11 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); // Assert - response.Data.Id.Should().Be(node.StringId); + response.Result.Data.Id.Should().Be(node.StringId); - response.Included.Should().BeEmpty(); + response.Result.Included.Should().BeEmpty(); } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs b/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs index dc7c5892b3..9480e36d65 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs @@ -1,6 +1,6 @@ using System.Net; using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; +using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -47,13 +47,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString); + ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] @@ -80,14 +80,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(2); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Result.Data.Should().HaveCount(2); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] @@ -114,13 +114,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(2).StringId); - response.Meta.ShouldNotBeNull(); - response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(2).StringId); + response.Result.Meta.ShouldNotBeNull(); + response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] diff --git a/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs b/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs index b0ee517f3e..445dd7817d 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs @@ -1,6 +1,6 @@ using System.Net; using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client.Exceptions; +using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -48,12 +48,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString); + ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); // Assert - response.Data.Should().HaveCount(2); - response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Data.ElementAt(1).Id.Should().Be(nodes[0].StringId); + response.Result.Data.Should().HaveCount(2); + response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Result.Data.ElementAt(1).Id.Should().Be(nodes[0].StringId); } [Fact] @@ -81,12 +81,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(2); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Result.Data.Should().HaveCount(2); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(0).StringId); } [Fact] @@ -114,12 +114,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(2); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Result.Data.Should().HaveCount(2); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); } [Fact] diff --git a/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs b/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs index 7172465408..7cd959c9ec 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs @@ -1,4 +1,5 @@ using FluentAssertions; +using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -45,14 +46,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString); + ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.StringId); - response.Data.ElementAt(0).Attributes.Name.Should().Be(node.Name); - response.Data.ElementAt(0).Attributes.Comment.Should().BeNull(); - response.Data.ElementAt(0).Relationships.Should().BeNull(); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.StringId); + response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(node.Name); + response.Result.Data.ElementAt(0).Attributes.Comment.Should().BeNull(); + response.Result.Data.ElementAt(0).Relationships.Should().BeNull(); } [Fact] @@ -76,14 +77,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); // Assert - response.Data.Id.Should().Be(node.StringId); - response.Data.Attributes.Name.Should().BeNull(); - response.Data.Attributes.Comment.Should().Be(node.Comment); - response.Data.Relationships.Parent.Should().NotBeNull(); - response.Data.Relationships.Children.Should().BeNull(); + response.Result.Data.Id.Should().Be(node.StringId); + response.Result.Data.Attributes.Name.Should().BeNull(); + response.Result.Data.Attributes.Comment.Should().Be(node.Comment); + response.Result.Data.Relationships.Parent.Should().NotBeNull(); + response.Result.Data.Relationships.Children.Should().BeNull(); } [Fact] @@ -109,15 +110,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); // Assert - response.Data.Should().HaveCount(1); - response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Data.ElementAt(0).Attributes.Name.Should().BeNull(); - response.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(0).Comment); - response.Data.ElementAt(0).Relationships.Parent.Should().BeNull(); - response.Data.ElementAt(0).Relationships.Children.Should().NotBeNull(); + response.Result.Data.Should().HaveCount(1); + response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Result.Data.ElementAt(0).Attributes.Name.Should().BeNull(); + response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(0).Comment); + response.Result.Data.ElementAt(0).Relationships.Parent.Should().BeNull(); + response.Result.Data.ElementAt(0).Relationships.Children.Should().NotBeNull(); } [Fact] @@ -142,15 +143,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NullableNodeSecondaryResponseDocument response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); // Assert - response.Data.ShouldNotBeNull(); - response.Data.Id.Should().Be(node.Parent.StringId); - response.Data.Attributes.Name.Should().BeNull(); - response.Data.Attributes.Comment.Should().Be(node.Parent.Comment); - response.Data.Relationships.Parent.Should().BeNull(); - response.Data.Relationships.Children.Should().NotBeNull(); + response.Result.Data.ShouldNotBeNull(); + response.Result.Data.Id.Should().Be(node.Parent.StringId); + response.Result.Data.Attributes.Name.Should().BeNull(); + response.Result.Data.Attributes.Comment.Should().Be(node.Parent.Comment); + response.Result.Data.Relationships.Parent.Should().BeNull(); + response.Result.Data.Relationships.Children.Should().NotBeNull(); } [Fact] @@ -174,10 +175,10 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString); + ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); // Assert - response.Data.Id.Should().Be(node.StringId); - response.Data.Attributes.Should().BeNull(); + response.Result.Data.Id.Should().Be(node.StringId); + response.Result.Data.Attributes.Should().BeNull(); } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 20ffda135a..b34d46ac21 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found nameValuePairs, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The nameValuePair was successfully created, which resulted in additional changes. The newly created nameValuePair is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found nameValuePair.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found node, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found node identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1031,12 +1007,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1044,12 +1019,11 @@ "description": "Successfully returns the found nodes, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1074,12 +1048,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1109,12 +1082,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1122,15 +1094,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1143,12 +1114,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1197,10 +1167,10 @@ "description": "The node was successfully created, which resulted in additional changes. The newly created node is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -1291,12 +1261,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1304,12 +1273,11 @@ "description": "Successfully returns the found node.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1344,12 +1312,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1388,12 +1355,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1401,15 +1367,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1422,12 +1387,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1606,12 +1570,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1619,12 +1582,11 @@ "description": "Successfully returns the found nodes, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1659,12 +1621,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1703,12 +1664,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1716,15 +1676,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1737,12 +1696,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1788,12 +1746,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1801,12 +1758,11 @@ "description": "Successfully returns the found node identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1841,12 +1797,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1885,12 +1840,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1898,7 +1852,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1906,12 +1860,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1919,12 +1872,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2171,12 +2123,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2184,12 +2135,11 @@ "description": "Successfully returns the found node, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2224,12 +2174,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2268,12 +2217,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2281,15 +2229,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2302,12 +2249,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2353,12 +2299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2366,12 +2311,11 @@ "description": "Successfully returns the found node identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2406,12 +2350,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2450,12 +2393,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2463,7 +2405,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2471,12 +2413,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2484,12 +2425,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2602,12 +2542,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2615,12 +2554,11 @@ "description": "Successfully returns the found nameValuePairs, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2655,12 +2593,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2699,12 +2636,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2712,15 +2648,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2733,12 +2668,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2784,12 +2718,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2797,12 +2730,11 @@ "description": "Successfully returns the found nameValuePair identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2837,12 +2769,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2881,12 +2812,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2894,7 +2824,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2902,12 +2832,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2915,12 +2844,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index 5f7b646885..4b2a4eba6e 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -72,15 +72,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[0].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[1].name", "If-None-Match"); parametersElement.Should().HaveProperty("[1].in", "header"); - parametersElement.Should().HaveProperty("[1].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[1].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscrapers, or an empty array if none were found."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); @@ -98,16 +97,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[0].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[1].name", "If-None-Match"); parametersElement.Should().HaveProperty("[1].in", "header"); - parametersElement.Should().HaveProperty("[1].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[1].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); @@ -128,7 +126,7 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(5); responsesElement.Should().HaveProperty("201.description", "The skyscraper was successfully created, which resulted in additional changes. The newly created skyscraper is returned."); - responsesElement.Should().HaveProperty("201.headers.Location.description", "Location of the newly created resource."); + responsesElement.Should().HaveProperty("201.headers.Location.description", "The URL at which the newly created JSON:API resource can be retrieved."); responsesElement.Should().HaveProperty("204.description", "The skyscraper was successfully created, which did not result in additional changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid or the request body is missing or malformed."); responsesElement.Should().HaveProperty("409.description", "A resource type in the request body is incompatible."); @@ -152,15 +150,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscraper."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -181,16 +178,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -259,15 +255,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator, or `null` if it was not found."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -288,16 +283,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -320,15 +314,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator identity, or `null` if it was not found."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -349,16 +342,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -404,15 +396,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found spaces, or an empty array if none were found."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -433,16 +424,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", ResourceTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -465,15 +455,14 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); getElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found space identities, or an empty array if none were found."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); @@ -494,16 +483,15 @@ public async Task Endpoints_are_documented() parametersElement.Should().HaveProperty("[1].description", RelationshipTextQueryString); parametersElement.Should().HaveProperty("[2].name", "If-None-Match"); parametersElement.Should().HaveProperty("[2].in", "header"); - parametersElement.Should().HaveProperty("[2].description", "ETag identifying the version of the requested resource."); + parametersElement.Should().HaveProperty("[2].description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); }); headElement.Should().ContainPath("responses").With(responsesElement => { responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); - responsesElement.Should().HaveProperty("200.headers.ETag.description", "ETag identifying the version of the fetched resource."); - responsesElement.Should().HaveProperty("200.headers.ETag.example", "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""); - responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the response body in bytes"); + responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index 9cf4e5ab8b..c1821f4e60 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -34,12 +34,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -47,12 +46,11 @@ "description": "Successfully returns the found airplanes, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -77,12 +75,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -112,12 +109,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -125,15 +121,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -146,12 +141,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -200,10 +194,10 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -294,12 +288,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -307,12 +300,11 @@ "description": "Successfully returns the found airplane.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -347,12 +339,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -391,12 +382,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -404,15 +394,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -425,12 +414,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -609,12 +597,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -622,12 +609,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -662,12 +648,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -706,12 +691,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -719,15 +703,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -740,12 +723,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -791,12 +773,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -804,12 +785,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -844,12 +824,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -888,12 +867,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -901,7 +879,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -909,12 +887,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -922,12 +899,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1165,12 +1141,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1178,12 +1153,11 @@ "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1208,12 +1182,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1243,12 +1216,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1256,15 +1228,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1277,12 +1248,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1331,10 +1301,10 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -1425,12 +1395,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1438,12 +1407,11 @@ "description": "Successfully returns the found flight-attendant.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1478,12 +1446,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1522,12 +1489,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1535,15 +1501,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1556,12 +1521,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1740,12 +1704,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1753,12 +1716,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1793,12 +1755,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -1837,12 +1798,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1850,15 +1810,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -1871,12 +1830,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -1922,12 +1880,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -1935,12 +1892,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -1975,12 +1931,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2019,12 +1974,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2032,7 +1986,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2040,12 +1994,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2053,12 +2006,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2305,12 +2257,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2318,12 +2269,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2358,12 +2308,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2402,12 +2351,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2415,15 +2363,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2436,12 +2383,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2487,12 +2433,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2500,12 +2445,11 @@ "description": "Successfully returns the found flight identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2540,12 +2484,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2584,12 +2527,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2597,7 +2539,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2605,12 +2547,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2618,12 +2559,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -2861,12 +2801,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2874,12 +2813,11 @@ "description": "Successfully returns the found flights, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -2904,12 +2842,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -2939,12 +2876,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -2952,15 +2888,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -2973,12 +2908,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3027,10 +2961,10 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -3121,12 +3055,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3134,12 +3067,11 @@ "description": "Successfully returns the found flight.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3174,12 +3106,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3218,12 +3149,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3231,15 +3161,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3252,12 +3181,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3436,12 +3364,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3449,12 +3376,11 @@ "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3489,12 +3415,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3533,12 +3458,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3546,15 +3470,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3567,12 +3490,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3618,12 +3540,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3631,12 +3552,11 @@ "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3671,12 +3591,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3715,12 +3634,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3728,7 +3646,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3736,12 +3654,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3749,12 +3666,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -3867,12 +3783,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3880,12 +3795,11 @@ "description": "Successfully returns the found flight-attendants, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -3920,12 +3834,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -3964,12 +3877,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -3977,15 +3889,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -3998,12 +3909,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4049,12 +3959,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4062,12 +3971,11 @@ "description": "Successfully returns the found flight-attendant identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4102,12 +4010,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4146,12 +4053,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4159,7 +4065,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4167,12 +4073,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4180,12 +4085,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4432,12 +4336,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4445,12 +4348,11 @@ "description": "Successfully returns the found passengers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4485,12 +4387,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4529,12 +4430,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4542,15 +4442,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4563,12 +4462,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4614,12 +4512,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4627,12 +4524,11 @@ "description": "Successfully returns the found passenger identities, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -4667,12 +4563,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -4711,12 +4606,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -4724,7 +4618,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -4732,12 +4626,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4745,12 +4638,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -4997,12 +4889,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5010,12 +4901,11 @@ "description": "Successfully returns the found flight-attendant, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5050,12 +4940,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5094,12 +4983,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5107,15 +4995,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5128,12 +5015,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5179,12 +5065,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5192,12 +5077,11 @@ "description": "Successfully returns the found flight-attendant identity, or `null` if it was not found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5232,12 +5116,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5276,12 +5159,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5289,7 +5171,7 @@ "description": "The operation completed successfully.", "headers": { "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5297,12 +5179,11 @@ "example": 891 }, "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5310,12 +5191,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5419,12 +5299,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5432,12 +5311,11 @@ "description": "Successfully returns the found passengers, or an empty array if none were found.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5462,12 +5340,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5497,12 +5374,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5510,15 +5386,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5531,12 +5406,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, @@ -5585,10 +5459,10 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "Location of the newly created resource.", + "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "string" + "type": "uri" } } }, @@ -5679,12 +5553,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5692,12 +5565,11 @@ "description": "Successfully returns the found passenger.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } }, "content": { @@ -5732,12 +5604,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } } @@ -5776,12 +5647,11 @@ { "name": "If-None-Match", "in": "header", - "description": "ETag identifying the version of the requested resource.", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { "type": "string", "nullable": true - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } ], "responses": { @@ -5789,15 +5659,14 @@ "description": "The operation completed successfully.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } }, "Content-Length": { - "description": "Size of the response body in bytes", + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { "type": "integer" @@ -5810,12 +5679,11 @@ "description": "The resource was not modified.", "headers": { "ETag": { - "description": "ETag identifying the version of the fetched resource.", + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { "type": "string" - }, - "example": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" + } } } }, From ad8ef94a8d8d644487e7a1f79538f11a8181aba9 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Sat, 17 Feb 2024 13:35:46 -0500 Subject: [PATCH 14/36] Remove dead code --- .../JsonApiDotNetCoreExampleClient/ExampleApiClient.cs | 10 ---------- .../JsonApiDotNetCoreExampleClient.csproj | 1 - 2 files changed, 11 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs b/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs index c804f0708c..e55e79d97e 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/ExampleApiClient.cs @@ -1,8 +1,6 @@ using JetBrains.Annotations; using JsonApiDotNetCore.OpenApi.Client; using Newtonsoft.Json; -using NSwag; -using NSwag.CodeGeneration; namespace JsonApiDotNetCoreExampleClient; @@ -18,11 +16,3 @@ partial void UpdateJsonSerializerSettings(JsonSerializerSettings settings) #endif } } - -public class TestParameterNameGenerator : IParameterNameGenerator -{ - public string Generate(OpenApiParameter parameter, IEnumerable allParameters) - { - throw new NotImplementedException("TTEESSST"); - } -} diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index 7a55fb2b78..ba1fea4f65 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -22,7 +22,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - From f66b8ed78cd991ec908e52f605dfed6fbcd6af45 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Sat, 17 Feb 2024 14:21:16 -0500 Subject: [PATCH 15/36] Use primary constructor --- .../ApiResponse.cs | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs index dd789f6617..4ee7c10b6d 100644 --- a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs +++ b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs @@ -4,17 +4,11 @@ namespace JsonApiDotNetCore.OpenApi.Client; [PublicAPI] -public class ApiResponse +public class ApiResponse(int statusCode, IReadOnlyDictionary> headers) { - public int StatusCode { get; private set; } + public int StatusCode { get; private set; } = statusCode; - public IReadOnlyDictionary> Headers { get; private set; } - - public ApiResponse(int statusCode, IReadOnlyDictionary> headers) - { - StatusCode = statusCode; - Headers = headers; - } + public IReadOnlyDictionary> Headers { get; private set; } = headers; public static async Task TranslateAsync(Func> operation) where TResponse : class @@ -79,13 +73,7 @@ public static async Task TranslateAsync(Func> ope } [PublicAPI] -public class ApiResponse : ApiResponse +public class ApiResponse(int statusCode, IReadOnlyDictionary> headers, TResult result) : ApiResponse(statusCode, headers) { - public TResult Result { get; private set; } - - public ApiResponse(int statusCode, IReadOnlyDictionary> headers, TResult result) - : base(statusCode, headers) - { - Result = result; - } + public TResult Result { get; private set; } = result; } From 69930d1a9fbe8c0045fccaec0beed1ade80ed08f Mon Sep 17 00:00:00 2001 From: verdie-g Date: Sat, 17 Feb 2024 21:31:46 -0500 Subject: [PATCH 16/36] Address easy PR comments --- .../JsonApiDotNetCoreExampleClient.csproj | 3 +-- .../SwaggerComponents/JsonApiOperationDocumentationFilter.cs | 1 - test/OpenApiClientTests/OpenApiClientTests.csproj | 1 - test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj index ba1fea4f65..326827e86f 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj +++ b/src/Examples/JsonApiDotNetCoreExampleClient/JsonApiDotNetCoreExampleClient.csproj @@ -2,7 +2,6 @@ net8.0 - enable Exe @@ -26,7 +25,7 @@ - /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /GenerateOptionalParameters:true /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /ParameterNameGenerator:JsonApiDotNetCoreExampleClient.TestParameterNameGenerator + /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 52d3e0c5cf..5e0961cb99 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -491,7 +491,6 @@ private static void SetResponseHeaderContentLength(OpenApiResponses responses, H { Type = "integer" }, - Example = new OpenApiInteger(891) }; } diff --git a/test/OpenApiClientTests/OpenApiClientTests.csproj b/test/OpenApiClientTests/OpenApiClientTests.csproj index 4a7ba6b838..6d2fb45151 100644 --- a/test/OpenApiClientTests/OpenApiClientTests.csproj +++ b/test/OpenApiClientTests/OpenApiClientTests.csproj @@ -2,7 +2,6 @@ net8.0 - enable diff --git a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj index 55c1be5f28..8597372169 100644 --- a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj +++ b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj @@ -2,7 +2,6 @@ net8.0 - enable From 8c265c774c9f356363814ce9af1e2ea7849e727e Mon Sep 17 00:00:00 2001 From: verdie-g Date: Sun, 18 Feb 2024 00:54:20 -0500 Subject: [PATCH 17/36] Rewrite e2e tests --- .../JsonApiDotNetCoreExample.json | 54 +- .../JsonApiOperationDocumentationFilter.cs | 2 +- .../LegacyClient/swagger.g.json | 66 +- .../CamelCase/swagger.g.json | 30 +- .../KebabCase/swagger.g.json | 30 +- .../PascalCase/swagger.g.json | 30 +- .../ModelStateValidationOff/swagger.g.json | 30 +- .../ModelStateValidationOn/swagger.g.json | 30 +- .../ModelStateValidationOff/swagger.g.json | 42 +- .../ModelStateValidationOn/swagger.g.json | 42 +- .../OpenApiEndToEndTests/Headers/ETagTests.cs | 116 +++ .../Headers/swagger.g.json | 980 ++++++++++++++++++ .../OpenApiEndToEndTests.csproj | 9 +- .../QueryStrings/ETagTests.cs | 76 -- .../QueryStrings/FilterTests.cs | 40 +- .../QueryStrings/IncludeTests.cs | 51 +- .../QueryStrings/PaginationTests.cs | 36 +- .../QueryStrings/SortTests.cs | 26 +- .../QueryStrings/SparseFieldSetTests.cs | 59 +- .../QueryStrings/swagger.g.json | 36 +- test/OpenApiTests/Headers/Country.cs | 16 + .../Headers/HeaderStringFakers.cs | 19 + test/OpenApiTests/Headers/HeaderTests.cs | 23 + test/OpenApiTests/Headers/HeadersDbContext.cs | 11 + .../LegacyOpenApiIntegration/swagger.json | 66 +- 25 files changed, 1431 insertions(+), 489 deletions(-) create mode 100644 test/OpenApiEndToEndTests/Headers/ETagTests.cs create mode 100644 test/OpenApiEndToEndTests/Headers/swagger.g.json delete mode 100644 test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs create mode 100644 test/OpenApiTests/Headers/Country.cs create mode 100644 test/OpenApiTests/Headers/HeaderStringFakers.cs create mode 100644 test/OpenApiTests/Headers/HeaderTests.cs create mode 100644 test/OpenApiTests/Headers/HeadersDbContext.cs diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index e9f0a2da94..3b01add934 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1267,8 +1263,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1436,8 +1431,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1792,8 +1786,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2065,8 +2058,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2374,8 +2366,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2543,8 +2534,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2899,8 +2889,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3172,8 +3161,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3481,8 +3469,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3650,8 +3637,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3900,8 +3886,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4069,8 +4054,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4319,8 +4303,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4488,8 +4471,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 5e0961cb99..6e8aea359a 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -490,7 +490,7 @@ private static void SetResponseHeaderContentLength(OpenApiResponses responses, H Schema = new OpenApiSchema { Type = "integer" - }, + } }; } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index 2df167a016..d65fac4e02 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1239,8 +1235,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1512,8 +1507,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1821,8 +1815,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1990,8 +1983,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2374,8 +2366,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2543,8 +2534,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2899,8 +2889,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3172,8 +3161,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3481,8 +3469,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3650,8 +3637,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3900,8 +3886,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4069,8 +4054,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4453,8 +4437,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4622,8 +4605,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5006,8 +4988,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -5175,8 +5156,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5397,8 +5377,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -5670,8 +5649,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 9a02920241..6205e08856 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -686,8 +684,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -959,8 +956,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1268,8 +1264,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1437,8 +1432,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1687,8 +1681,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1856,8 +1849,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2240,8 +2232,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2409,8 +2400,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index dfda65853e..da82807c7e 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -686,8 +684,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -959,8 +956,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1268,8 +1264,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1437,8 +1432,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1687,8 +1681,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1856,8 +1849,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2240,8 +2232,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2409,8 +2400,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 8de9a52a79..4322f56aaf 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -686,8 +684,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -959,8 +956,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1268,8 +1264,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1437,8 +1432,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1687,8 +1681,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1856,8 +1849,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2240,8 +2232,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2409,8 +2400,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 42f5fae4c7..ffddb68108 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1267,8 +1263,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1436,8 +1431,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,8 +1680,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1855,8 +1848,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2239,8 +2231,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2408,8 +2399,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 28e738af2f..e60367fa2d 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1267,8 +1263,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1436,8 +1431,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,8 +1680,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1855,8 +1848,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2239,8 +2231,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2408,8 +2399,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index c231ce9f4a..cf150a274d 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1133,8 +1129,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1302,8 +1297,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1552,8 +1546,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1721,8 +1714,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1971,8 +1963,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2140,8 +2131,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2390,8 +2380,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2559,8 +2548,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2943,8 +2931,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3112,8 +3099,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 27b95c5d06..4870f49633 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1133,8 +1129,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1302,8 +1297,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1552,8 +1546,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1721,8 +1714,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1971,8 +1963,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2140,8 +2131,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2390,8 +2380,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2559,8 +2548,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2943,8 +2931,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3112,8 +3099,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs new file mode 100644 index 0000000000..641a7b8553 --- /dev/null +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -0,0 +1,116 @@ +using System.Net; +using FluentAssertions; +using JsonApiDotNetCore.OpenApi.Client; +using Microsoft.Net.Http.Headers; +using OpenApiEndToEndTests.Headers.GeneratedCode; +using OpenApiTests; +using OpenApiTests.Headers; +using TestBuildingBlocks; +using Xunit; + +namespace OpenApiEndToEndTests.Headers; + +public sealed class ETagTests : IClassFixture, HeadersDbContext>> +{ + private readonly IntegrationTestContext, HeadersDbContext> _testContext; + private readonly HeaderFakers _fakers = new(); + + public ETagTests(IntegrationTestContext, HeadersDbContext> testContext) + { + _testContext = testContext; + + testContext.UseController(); + } + + [Fact] + public async Task Get_should_return_etag() + { + // Arrange + Country country = _fakers.Country.Generate(); + + await _testContext.RunOnDatabaseAsync(async dbContext => + { + await dbContext.ClearTableAsync(); + dbContext.Countries.Add(country); + await dbContext.SaveChangesAsync(); + }); + + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); + + // Assert + response.StatusCode.Should().Be((int)HttpStatusCode.OK); + response.Headers.Should().ContainKey(HeaderNames.ETag); + } + + [Fact] + public async Task Getting_twice_unmodified_resource_should_return_304() + { + // Arrange + Country country = _fakers.Country.Generate(); + + await _testContext.RunOnDatabaseAsync(async dbContext => + { + await dbContext.ClearTableAsync(); + dbContext.Countries.Add(country); + await dbContext.SaveChangesAsync(); + }); + + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); + string etag = response1.Headers[HeaderNames.ETag].First(); + + ApiResponse response2 = + await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!, if_None_Match: etag)); + + // Assert + response2.StatusCode.Should().Be((int)HttpStatusCode.NotModified); + response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().Equal([etag]); + } + + [Fact] + public async Task Getting_twice_modified_resource_should_return_200() + { + // Arrange + Country country = _fakers.Country.Generate(); + + await _testContext.RunOnDatabaseAsync(async dbContext => + { + await dbContext.ClearTableAsync(); + dbContext.Countries.Add(country); + await dbContext.SaveChangesAsync(); + }); + + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); + string etag = response1.Headers[HeaderNames.ETag].First(); + + await ApiResponse.TranslateAsync(() => apiClient.PatchCountryAsync(country.StringId!, body: new CountryPatchRequestDocument + { + Data = new CountryDataInPatchRequest + { + Id = country.StringId!, + Attributes = new CountryAttributesInPatchRequest + { + Name = _fakers.Country.Generate().Name + } + } + })); + + ApiResponse response3 = + await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!, if_None_Match: etag)); + + // Assert + response3.StatusCode.Should().Be((int)HttpStatusCode.OK); + response3.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotEqual([etag]); + } +} diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json new file mode 100644 index 0000000000..849398006b --- /dev/null +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -0,0 +1,980 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "OpenApiTests", + "version": "1.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/countries": { + "get": { + "tags": [ + "countries" + ], + "summary": "Retrieves a collection of countries.", + "operationId": "getCountryCollection", + "parameters": [ + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returns the found countries, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/countryCollectionResponseDocument" + } + } + } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + } + } + }, + "head": { + "tags": [ + "countries" + ], + "summary": "Retrieves a collection of countries without returning them.", + "description": "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.", + "operationId": "headCountryCollection", + "parameters": [ + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + }, + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", + "required": true, + "schema": { + "type": "integer" + } + } + } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid." + } + } + }, + "post": { + "tags": [ + "countries" + ], + "summary": "Creates a new country.", + "operationId": "postCountry", + "parameters": [ + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + } + ], + "requestBody": { + "description": "The attributes and relationships of the country to create.", + "content": { + "application/vnd.api+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/countryPostRequestDocument" + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "The country was successfully created, which resulted in additional changes. The newly created country is returned.", + "headers": { + "Location": { + "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "required": true, + "schema": { + "type": "uri" + } + } + }, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/countryPrimaryResponseDocument" + } + } + } + }, + "204": { + "description": "The country was successfully created, which did not result in additional changes." + }, + "400": { + "description": "The query string is invalid or the request body is missing or malformed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "403": { + "description": "Client-generated IDs cannot be used at this endpoint.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "409": { + "description": "A resource type in the request body is incompatible.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "422": { + "description": "Validation of the request body failed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + } + }, + "/countries/{id}": { + "get": { + "tags": [ + "countries" + ], + "summary": "Retrieves an individual country by its identifier.", + "operationId": "getCountry", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returns the found country.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/countryPrimaryResponseDocument" + } + } + } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + } + } + }, + "head": { + "tags": [ + "countries" + ], + "summary": "Retrieves an individual country by its identifier without returning it.", + "description": "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.", + "operationId": "headCountry", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + }, + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", + "required": true, + "schema": { + "type": "integer" + } + } + } + }, + "304": { + "description": "The resource was not modified.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid." + }, + "404": { + "description": "The country does not exist." + } + } + }, + "patch": { + "tags": [ + "countries" + ], + "summary": "Updates an existing country.", + "operationId": "patchCountry", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + } + ], + "requestBody": { + "description": "The attributes and relationships of the country to update. Omitted fields are left unchanged.", + "content": { + "application/vnd.api+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/countryPatchRequestDocument" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The country was successfully updated, which resulted in additional changes. The updated country is returned.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/countryPrimaryResponseDocument" + } + } + } + }, + "204": { + "description": "The country was successfully updated, which did not result in additional changes." + }, + "400": { + "description": "The query string is invalid or the request body is missing or malformed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country or a related resource does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "409": { + "description": "A resource type or identifier in the request body is incompatible.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "422": { + "description": "Validation of the request body failed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + }, + "delete": { + "tags": [ + "countries" + ], + "summary": "Deletes an existing country by its identifier.", + "operationId": "deleteCountry", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The country was successfully deleted." + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "countryAttributesInPatchRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "population": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "countryAttributesInPostRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "population": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "countryAttributesInResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "population": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "countryCollectionResponseDocument": { + "required": [ + "data", + "links" + ], + "type": "object", + "properties": { + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceCollectionDocument" + } + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/countryDataInResponse" + } + }, + "included": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dataInResponse" + } + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + }, + "countryDataInPatchRequest": { + "required": [ + "id", + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/countryResourceType" + }, + "id": { + "minLength": 1, + "type": "string" + }, + "attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/countryAttributesInPatchRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryDataInPostRequest": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/countryResourceType" + }, + "attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/countryAttributesInPostRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryDataInResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/dataInResponse" + }, + { + "required": [ + "links" + ], + "type": "object", + "properties": { + "attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/countryAttributesInResponse" + } + ] + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceData" + } + ] + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + } + ], + "additionalProperties": false + }, + "countryPatchRequestDocument": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/countryDataInPatchRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryPostRequestDocument": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/countryDataInPostRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryPrimaryResponseDocument": { + "required": [ + "data", + "links" + ], + "type": "object", + "properties": { + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceDocument" + } + ] + }, + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/countryDataInResponse" + } + ] + }, + "included": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dataInResponse" + } + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + }, + "countryResourceType": { + "enum": [ + "countries" + ], + "type": "string", + "additionalProperties": false + }, + "dataInResponse": { + "required": [ + "id", + "type" + ], + "type": "object", + "properties": { + "type": { + "minLength": 1, + "type": "string" + }, + "id": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "discriminator": { + "propertyName": "type", + "mapping": { + "countries": "#/components/schemas/countryDataInResponse" + } + }, + "x-abstract": true + }, + "errorLinks": { + "type": "object", + "properties": { + "about": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "errorObject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/errorLinks" + } + ], + "nullable": true + }, + "status": { + "type": "string" + }, + "code": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "detail": { + "type": "string", + "nullable": true + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/errorSource" + } + ], + "nullable": true + }, + "meta": { + "type": "object", + "additionalProperties": { }, + "nullable": true + } + }, + "additionalProperties": false + }, + "errorResponseDocument": { + "required": [ + "errors" + ], + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/errorObject" + } + } + }, + "additionalProperties": false + }, + "errorSource": { + "type": "object", + "properties": { + "pointer": { + "type": "string", + "nullable": true + }, + "parameter": { + "type": "string", + "nullable": true + }, + "header": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "linksInResourceCollectionDocument": { + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "minLength": 1, + "type": "string" + }, + "describedby": { + "type": "string" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + }, + "prev": { + "type": "string" + }, + "next": { + "type": "string" + } + }, + "additionalProperties": false + }, + "linksInResourceData": { + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "linksInResourceDocument": { + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "minLength": 1, + "type": "string" + }, + "describedby": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } +} \ No newline at end of file diff --git a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj index 8597372169..cbec3e0180 100644 --- a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj +++ b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj @@ -23,12 +23,19 @@ + + OpenApiEndToEndTests.Headers.GeneratedCode + HeadersClient + HeadersClient.cs + NSwagCSharp + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true + OpenApiEndToEndTests.QueryStrings.GeneratedCode QueryStringsClient QueryStringsClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:true diff --git a/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs b/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs deleted file mode 100644 index 2a5e29d6dc..0000000000 --- a/test/OpenApiEndToEndTests/QueryStrings/ETagTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Net; -using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client; -using Microsoft.Net.Http.Headers; -using OpenApiEndToEndTests.QueryStrings.GeneratedCode; -using OpenApiTests; -using OpenApiTests.QueryStrings; -using TestBuildingBlocks; -using Xunit; -using Xunit.Abstractions; - -namespace OpenApiEndToEndTests.QueryStrings; - -public sealed class ETagTests : IClassFixture, QueryStringsDbContext>> -{ - private readonly IntegrationTestContext, QueryStringsDbContext> _testContext; - private readonly ITestOutputHelper _testOutputHelper; - private readonly QueryStringFakers _fakers = new(); - - public ETagTests(IntegrationTestContext, QueryStringsDbContext> testContext, ITestOutputHelper testOutputHelper) - { - _testContext = testContext; - _testOutputHelper = testOutputHelper; - - testContext.UseController(); - } - - [Fact] - public async Task Read_Read_Write_Read_Scenario() - { - // Arrange - Node node = _fakers.Node.Generate(); - node.Name = "Bob l'éponge"; - - await _testContext.RunOnDatabaseAsync(async dbContext => - { - await dbContext.ClearTableAsync(); - dbContext.Nodes.Add(node); - await dbContext.SaveChangesAsync(); - }); - - using HttpClient httpClient = _testContext.Factory.CreateClient(); - var apiClient = new QueryStringsClient(httpClient, _testOutputHelper); - - // Act & Assert - ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!)); - response1.StatusCode.Should().Be((int)HttpStatusCode.OK); - response1.Headers.Should().ContainKey(HeaderNames.ETag); - string response1Etag = response1.Headers[HeaderNames.ETag].First(); - - ApiResponse response2 = - await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!, if_None_Match: response1Etag)); - - response2.StatusCode.Should().Be((int)HttpStatusCode.NotModified); - response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().Equal([response1Etag]); - - ApiResponse response3 = await ApiResponse.TranslateAsync(() => apiClient.PatchNodeAsync(node.StringId!, - body: new NodePatchRequestDocument - { - Data = new NodeDataInPatchRequest - { - Id = node.StringId!, - Attributes = new NodeAttributesInPatchRequest - { - Name = "Yann Le Gac" - } - } - })); - - response3.StatusCode.Should().Be((int)HttpStatusCode.NoContent); - - ApiResponse response4 = await ApiResponse.TranslateAsync(() => apiClient.GetNodeAsync(node.StringId!)); - response4.StatusCode.Should().Be((int)HttpStatusCode.OK); - response4.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotEqual([response1Etag]); - } -} diff --git a/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs b/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs index b65b1965c8..b4e2d82ebe 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/FilterTests.cs @@ -48,15 +48,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(nodes[1].Name); - response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(nodes[1].Comment); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Data.ElementAt(0).Attributes.Name.Should().Be(nodes[1].Name); + response.Data.ElementAt(0).Attributes.Comment.Should().Be(nodes[1].Comment); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] @@ -84,15 +84,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(node.Children.ElementAt(1).Name); - response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(1).Comment); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Data.ElementAt(0).Attributes.Name.Should().Be(node.Children.ElementAt(1).Name); + response.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(1).Comment); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] @@ -120,13 +120,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(1)); } [Fact] @@ -142,7 +142,7 @@ public async Task Cannot_use_empty_filter() }; // Act - Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString); + Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString, null); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; diff --git a/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs b/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs index f8c37a0df0..0892ff67fd 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/IncludeTests.cs @@ -1,5 +1,4 @@ using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -47,15 +46,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString, null); // Assert - response.Result.Data.ShouldHaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.StringId); + response.Data.ShouldHaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.StringId); - response.Result.Included.Should().HaveCount(2); - response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(0).StringId); - response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(1).StringId); + response.Included.Should().HaveCount(2); + response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(0).StringId); + response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values.ElementAt(1).StringId); } [Fact] @@ -82,15 +81,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); + NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Id.Should().Be(node.StringId); + response.Data.Id.Should().Be(node.StringId); - response.Result.Included.Should().HaveCount(3); - response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(0).StringId); - response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(1).StringId); - response.Result.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values[0].StringId); + response.Included.Should().HaveCount(3); + response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(0).StringId); + response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Children.ElementAt(1).StringId); + response.Included.Should().ContainSingle(include => include is NameValuePairDataInResponse && include.Id == node.Values[0].StringId); } [Fact] @@ -117,14 +116,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeValuesAsync(node.StringId!, queryString); + NameValuePairCollectionResponseDocument response = await apiClient.GetNodeValuesAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.ShouldHaveCount(2); + response.Data.ShouldHaveCount(2); - response.Result.Included.ShouldHaveCount(2); - response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.StringId); - response.Result.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Parent.StringId); + response.Included.ShouldHaveCount(2); + response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.StringId); + response.Included.Should().ContainSingle(include => include is NodeDataInResponse && include.Id == node.Parent.StringId); } [Fact] @@ -151,15 +150,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); + NullableNodeSecondaryResponseDocument response = await apiClient.GetNodeParentAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.ShouldNotBeNull(); - response.Result.Data.Id.Should().Be(node.Parent.StringId); + response.Data.ShouldNotBeNull(); + response.Data.Id.Should().Be(node.Parent.StringId); - response.Result.Included.Should().HaveCount(1); + response.Included.Should().HaveCount(1); - NodeDataInResponse? include = response.Result.Included.ElementAt(0).Should().BeOfType().Subject; + NodeDataInResponse? include = response.Included.ElementAt(0).Should().BeOfType().Subject; include.Id.Should().Be(node.Parent.Parent.StringId); include.Attributes.Name.Should().Be(node.Parent.Parent.Name); } @@ -185,11 +184,11 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); + NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Id.Should().Be(node.StringId); + response.Data.Id.Should().Be(node.StringId); - response.Result.Included.Should().BeEmpty(); + response.Included.Should().BeEmpty(); } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs b/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs index 9480e36d65..35eb780024 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/PaginationTests.cs @@ -47,13 +47,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] @@ -80,14 +80,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(2); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Data.Should().HaveCount(2); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] @@ -114,13 +114,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(2).StringId); - response.Result.Meta.ShouldNotBeNull(); - response.Result.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(2).StringId); + response.Meta.ShouldNotBeNull(); + response.Meta.ShouldContainKey("total").With(total => total.Should().Be(3)); } [Fact] @@ -136,7 +136,7 @@ public async Task Cannot_use_empty_page_size() }; // Act - Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString); + Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString, null); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; @@ -165,7 +165,7 @@ public async Task Cannot_use_empty_page_number() }; // Act - Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString); + Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString, null); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; diff --git a/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs b/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs index 445dd7817d..e988989632 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/SortTests.cs @@ -48,12 +48,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString, null); // Assert - response.Result.Data.Should().HaveCount(2); - response.Result.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); - response.Result.Data.ElementAt(1).Id.Should().Be(nodes[0].StringId); + response.Data.Should().HaveCount(2); + response.Data.ElementAt(0).Id.Should().Be(nodes[1].StringId); + response.Data.ElementAt(1).Id.Should().Be(nodes[0].StringId); } [Fact] @@ -81,12 +81,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(2); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); - response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Data.Should().HaveCount(2); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(0).StringId); } [Fact] @@ -114,12 +114,12 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString); + NodeIdentifierCollectionResponseDocument response = await apiClient.GetNodeChildrenRelationshipAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(2); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Result.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); + response.Data.Should().HaveCount(2); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Data.ElementAt(1).Id.Should().Be(node.Children.ElementAt(1).StringId); } [Fact] @@ -135,7 +135,7 @@ public async Task Cannot_use_empty_sort() }; // Act - Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString); + Func action = async () => _ = await apiClient.GetNodeAsync(Unknown.StringId.Int64, queryString, null); // Assert ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; diff --git a/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs b/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs index 7cd959c9ec..05fa1f710a 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs +++ b/test/OpenApiEndToEndTests/QueryStrings/SparseFieldSetTests.cs @@ -1,5 +1,4 @@ using FluentAssertions; -using JsonApiDotNetCore.OpenApi.Client; using OpenApiEndToEndTests.QueryStrings.GeneratedCode; using OpenApiTests; using OpenApiTests.QueryStrings; @@ -46,14 +45,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeCollectionAsync(queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeCollectionAsync(queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.StringId); - response.Result.Data.ElementAt(0).Attributes.Name.Should().Be(node.Name); - response.Result.Data.ElementAt(0).Attributes.Comment.Should().BeNull(); - response.Result.Data.ElementAt(0).Relationships.Should().BeNull(); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.StringId); + response.Data.ElementAt(0).Attributes.Name.Should().Be(node.Name); + response.Data.ElementAt(0).Attributes.Comment.Should().BeNull(); + response.Data.ElementAt(0).Relationships.Should().BeNull(); } [Fact] @@ -77,14 +76,14 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); + NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Id.Should().Be(node.StringId); - response.Result.Data.Attributes.Name.Should().BeNull(); - response.Result.Data.Attributes.Comment.Should().Be(node.Comment); - response.Result.Data.Relationships.Parent.Should().NotBeNull(); - response.Result.Data.Relationships.Children.Should().BeNull(); + response.Data.Id.Should().Be(node.StringId); + response.Data.Attributes.Name.Should().BeNull(); + response.Data.Attributes.Comment.Should().Be(node.Comment); + response.Data.Relationships.Parent.Should().NotBeNull(); + response.Data.Relationships.Children.Should().BeNull(); } [Fact] @@ -110,15 +109,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString); + NodeCollectionResponseDocument response = await apiClient.GetNodeChildrenAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Should().HaveCount(1); - response.Result.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); - response.Result.Data.ElementAt(0).Attributes.Name.Should().BeNull(); - response.Result.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(0).Comment); - response.Result.Data.ElementAt(0).Relationships.Parent.Should().BeNull(); - response.Result.Data.ElementAt(0).Relationships.Children.Should().NotBeNull(); + response.Data.Should().HaveCount(1); + response.Data.ElementAt(0).Id.Should().Be(node.Children.ElementAt(0).StringId); + response.Data.ElementAt(0).Attributes.Name.Should().BeNull(); + response.Data.ElementAt(0).Attributes.Comment.Should().Be(node.Children.ElementAt(0).Comment); + response.Data.ElementAt(0).Relationships.Parent.Should().BeNull(); + response.Data.ElementAt(0).Relationships.Children.Should().NotBeNull(); } [Fact] @@ -143,15 +142,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeParentAsync(node.StringId!, queryString); + NullableNodeSecondaryResponseDocument response = await apiClient.GetNodeParentAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.ShouldNotBeNull(); - response.Result.Data.Id.Should().Be(node.Parent.StringId); - response.Result.Data.Attributes.Name.Should().BeNull(); - response.Result.Data.Attributes.Comment.Should().Be(node.Parent.Comment); - response.Result.Data.Relationships.Parent.Should().BeNull(); - response.Result.Data.Relationships.Children.Should().NotBeNull(); + response.Data.ShouldNotBeNull(); + response.Data.Id.Should().Be(node.Parent.StringId); + response.Data.Attributes.Name.Should().BeNull(); + response.Data.Attributes.Comment.Should().Be(node.Parent.Comment); + response.Data.Relationships.Parent.Should().BeNull(); + response.Data.Relationships.Children.Should().NotBeNull(); } [Fact] @@ -175,10 +174,10 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - ApiResponse response = await apiClient.GetNodeAsync(node.StringId!, queryString); + NodePrimaryResponseDocument response = await apiClient.GetNodeAsync(node.StringId!, queryString, null); // Assert - response.Result.Data.Id.Should().Be(node.StringId); - response.Result.Data.Attributes.Should().BeNull(); + response.Data.Id.Should().Be(node.StringId); + response.Data.Attributes.Should().BeNull(); } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index b34d46ac21..34ded764bd 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1105,8 +1101,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1378,8 +1373,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1687,8 +1681,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1856,8 +1849,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2240,8 +2232,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2409,8 +2400,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2659,8 +2649,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2828,8 +2817,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiTests/Headers/Country.cs b/test/OpenApiTests/Headers/Country.cs new file mode 100644 index 0000000000..4df014bcab --- /dev/null +++ b/test/OpenApiTests/Headers/Country.cs @@ -0,0 +1,16 @@ +using JetBrains.Annotations; +using JsonApiDotNetCore.Resources; +using JsonApiDotNetCore.Resources.Annotations; + +namespace OpenApiTests.Headers; + +[UsedImplicitly(ImplicitUseTargetFlags.Members)] +[Resource(ControllerNamespace = "OpenApiTests.Headers")] +public sealed class Country : Identifiable +{ + [Attr] + public string Name { get; set; } = null!; + + [Attr] + public int Population { get; set; } +} diff --git a/test/OpenApiTests/Headers/HeaderStringFakers.cs b/test/OpenApiTests/Headers/HeaderStringFakers.cs new file mode 100644 index 0000000000..9d9a69aea9 --- /dev/null +++ b/test/OpenApiTests/Headers/HeaderStringFakers.cs @@ -0,0 +1,19 @@ +using Bogus; +using JetBrains.Annotations; +using TestBuildingBlocks; + +// @formatter:wrap_chained_method_calls chop_if_long +// @formatter:wrap_before_first_method_call true + +namespace OpenApiTests.Headers; + +[UsedImplicitly(ImplicitUseTargetFlags.Members)] +public sealed class HeaderFakers : FakerContainer +{ + private readonly Lazy> _lazyCountryFaker = new(() => new Faker() + .UseSeed(GetFakerSeed()) + .RuleFor(country => country.Name, faker => faker.Address.Country()) + .RuleFor(country => country.Population, faker => faker.Random.Number())); + + public Faker Country => _lazyCountryFaker.Value; +} diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs new file mode 100644 index 0000000000..7bc8c1fae8 --- /dev/null +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -0,0 +1,23 @@ +using Xunit; + +namespace OpenApiTests.Headers; + +public sealed class HeaderTests : IClassFixture, HeadersDbContext>> +{ + private readonly OpenApiTestContext, HeadersDbContext> _testContext; + + public HeaderTests(OpenApiTestContext, HeadersDbContext> testContext) + { + _testContext = testContext; + + testContext.UseController(); + + testContext.SwaggerDocumentOutputDirectory = "test/OpenApiEndToEndTests/Headers"; + } + + [Fact] + public Task Dummy() + { + return _testContext.GetSwaggerDocumentAsync(); + } +} diff --git a/test/OpenApiTests/Headers/HeadersDbContext.cs b/test/OpenApiTests/Headers/HeadersDbContext.cs new file mode 100644 index 0000000000..77dfea076b --- /dev/null +++ b/test/OpenApiTests/Headers/HeadersDbContext.cs @@ -0,0 +1,11 @@ +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using TestBuildingBlocks; + +namespace OpenApiTests.Headers; + +[UsedImplicitly(ImplicitUseTargetFlags.Members)] +public sealed class HeadersDbContext(DbContextOptions options) : TestableDbContext(options) +{ + public DbSet Countries => Set(); +} diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index c1821f4e60..d1846d8dd0 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -132,8 +132,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -405,8 +404,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -714,8 +712,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -883,8 +880,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1239,8 +1235,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1512,8 +1507,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1821,8 +1815,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -1990,8 +1983,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2374,8 +2366,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -2543,8 +2534,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2899,8 +2889,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3172,8 +3161,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3481,8 +3469,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -3650,8 +3637,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3900,8 +3886,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4069,8 +4054,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4453,8 +4437,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -4622,8 +4605,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5006,8 +4988,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -5175,8 +5156,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } }, "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5397,8 +5377,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, @@ -5670,8 +5649,7 @@ "required": true, "schema": { "type": "integer" - }, - "example": 891 + } } } }, From 456a78cbc2fc39d06baece7a6db9818cf32d4cac Mon Sep 17 00:00:00 2001 From: verdie-g Date: Mon, 19 Feb 2024 11:14:55 -0500 Subject: [PATCH 18/36] Address PR comments (1/2) - will not compile --- .../JsonApiDotNetCoreExample.json | 72 +++++++-------- .../JsonApiDotNetCoreExampleClient/Program.cs | 4 +- .../OpenApiEndpointConvention.cs | 2 +- .../JsonApiOperationDocumentationFilter.cs | 5 +- .../LegacyClient/swagger.g.json | 88 +++++++++---------- .../CamelCase/swagger.g.json | 40 ++++----- .../KebabCase/swagger.g.json | 40 ++++----- .../PascalCase/swagger.g.json | 40 ++++----- .../ModelStateValidationOff/swagger.g.json | 40 ++++----- .../ModelStateValidationOn/swagger.g.json | 40 ++++----- .../ModelStateValidationOff/swagger.g.json | 56 ++++++------ .../ModelStateValidationOn/swagger.g.json | 56 ++++++------ .../Headers/swagger.g.json | 8 +- .../OpenApiEndToEndTests.csproj | 2 +- .../QueryStrings/swagger.g.json | 48 +++++----- .../DocComments/DocCommentsTests.cs | 24 ++--- test/OpenApiTests/Headers/Country.cs | 2 +- .../Headers/HeaderStringFakers.cs | 2 +- .../LegacyOpenApiIntegration/swagger.json | 88 +++++++++---------- 19 files changed, 329 insertions(+), 328 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 3b01add934..1314fdc7f7 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1194,7 +1194,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1268,7 +1268,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1369,7 +1369,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1443,7 +1443,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1726,7 +1726,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1791,7 +1791,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1989,7 +1989,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2063,7 +2063,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2297,7 +2297,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2371,7 +2371,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2472,7 +2472,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2546,7 +2546,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2829,7 +2829,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2894,7 +2894,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3092,7 +3092,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3166,7 +3166,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3400,7 +3400,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3474,7 +3474,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3575,7 +3575,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3649,7 +3649,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3817,7 +3817,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3891,7 +3891,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3992,7 +3992,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4066,7 +4066,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4234,7 +4234,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4308,7 +4308,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4409,7 +4409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4483,7 +4483,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs index 2e3a9488af..7f3926f00c 100644 --- a/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs +++ b/src/Examples/JsonApiDotNetCoreExampleClient/Program.cs @@ -17,9 +17,9 @@ ApiResponse getResponse1 = await GetPersonCollectionAsync(apiClient, null); ApiResponse getResponse2 = await GetPersonCollectionAsync(apiClient, getResponse1.Headers[HeaderNames.ETag].First()); -if (getResponse2.StatusCode == (int)HttpStatusCode.NotModified) +if (getResponse2 is { StatusCode: (int)HttpStatusCode.NotModified, Result: null }) { - // getResponse2.Result is null. + Console.WriteLine("The HTTP response hasn't changed, so no response body was returned."); } foreach (PersonDataInResponse person in getResponse1.Result!.Data) diff --git a/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs b/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs index bbeb4bbe6b..5def543904 100644 --- a/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs +++ b/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs @@ -148,7 +148,7 @@ private static IEnumerable GetSuccessStatusCodesForEndpoint(Json return endpoint switch { JsonApiEndpoint.GetCollection or JsonApiEndpoint.GetSingle or JsonApiEndpoint.GetSecondary or JsonApiEndpoint.GetRelationship - => [HttpStatusCode.OK], + => [HttpStatusCode.OK, HttpStatusCode.NotModified], JsonApiEndpoint.Post => [ HttpStatusCode.Created, diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 6e8aea359a..b1bc33d17b 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -31,7 +31,7 @@ internal sealed class JsonApiOperationDocumentationFilter : IOperationFilter "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched."; private const string TextCompletedSuccessfully = "The operation completed successfully."; - private const string TextNotModified = "The resource was not modified."; + private const string TextNotModified = "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."; private const string TextQueryStringBad = "The query string is invalid."; private const string TextRequestBodyBad = "The request body is missing or malformed."; private const string TextQueryStringOrRequestBodyBad = "The query string is invalid or the request body is missing or malformed."; @@ -504,7 +504,8 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt Required = true, Schema = new OpenApiSchema { - Type = "uri" + Type = "string", + Format = "uri" } }; } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index d65fac4e02..c5914a18d7 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1175,7 +1175,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1240,7 +1240,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1438,7 +1438,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1512,7 +1512,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1746,7 +1746,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1820,7 +1820,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1921,7 +1921,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1995,7 +1995,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2297,7 +2297,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2371,7 +2371,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2472,7 +2472,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2546,7 +2546,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2829,7 +2829,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2894,7 +2894,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3092,7 +3092,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3166,7 +3166,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3400,7 +3400,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3474,7 +3474,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3575,7 +3575,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3649,7 +3649,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3817,7 +3817,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3891,7 +3891,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3992,7 +3992,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4066,7 +4066,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4368,7 +4368,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4442,7 +4442,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4543,7 +4543,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4617,7 +4617,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4919,7 +4919,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4993,7 +4993,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5094,7 +5094,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5168,7 +5168,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5317,7 +5317,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5382,7 +5382,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5580,7 +5580,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5654,7 +5654,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 6205e08856..06d252c5f8 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -624,7 +624,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -689,7 +689,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -887,7 +887,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -961,7 +961,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1195,7 +1195,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1269,7 +1269,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1370,7 +1370,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1444,7 +1444,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1612,7 +1612,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,7 +1686,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1787,7 +1787,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1861,7 +1861,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2163,7 +2163,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2237,7 +2237,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2338,7 +2338,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2412,7 +2412,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index da82807c7e..2d1a3430a1 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -624,7 +624,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -689,7 +689,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -887,7 +887,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -961,7 +961,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1195,7 +1195,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1269,7 +1269,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1370,7 +1370,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1444,7 +1444,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1612,7 +1612,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,7 +1686,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1787,7 +1787,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1861,7 +1861,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2163,7 +2163,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2237,7 +2237,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2338,7 +2338,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2412,7 +2412,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 4322f56aaf..5003a43948 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -624,7 +624,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -689,7 +689,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -887,7 +887,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -961,7 +961,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1195,7 +1195,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1269,7 +1269,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1370,7 +1370,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1444,7 +1444,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1612,7 +1612,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,7 +1686,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1787,7 +1787,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1861,7 +1861,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2163,7 +2163,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2237,7 +2237,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2338,7 +2338,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2412,7 +2412,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index ffddb68108..a87580d120 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1194,7 +1194,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1268,7 +1268,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1369,7 +1369,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1443,7 +1443,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1611,7 +1611,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1685,7 +1685,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1786,7 +1786,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1860,7 +1860,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2162,7 +2162,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2236,7 +2236,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2337,7 +2337,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2411,7 +2411,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index e60367fa2d..307a570598 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1194,7 +1194,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1268,7 +1268,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1369,7 +1369,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1443,7 +1443,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1611,7 +1611,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1685,7 +1685,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1786,7 +1786,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1860,7 +1860,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2162,7 +2162,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2236,7 +2236,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2337,7 +2337,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2411,7 +2411,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index cf150a274d..0464fafca3 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1060,7 +1060,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1134,7 +1134,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1235,7 +1235,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1309,7 +1309,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1477,7 +1477,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1551,7 +1551,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1652,7 +1652,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1726,7 +1726,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1894,7 +1894,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1968,7 +1968,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2069,7 +2069,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2143,7 +2143,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2311,7 +2311,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2385,7 +2385,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2486,7 +2486,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2560,7 +2560,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2862,7 +2862,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2936,7 +2936,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3037,7 +3037,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3111,7 +3111,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 4870f49633..2c1ee34952 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1060,7 +1060,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1134,7 +1134,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1235,7 +1235,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1309,7 +1309,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1477,7 +1477,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1551,7 +1551,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1652,7 +1652,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1726,7 +1726,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1894,7 +1894,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1968,7 +1968,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2069,7 +2069,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2143,7 +2143,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2311,7 +2311,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2385,7 +2385,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2486,7 +2486,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2560,7 +2560,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2862,7 +2862,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2936,7 +2936,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3037,7 +3037,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3111,7 +3111,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index 849398006b..a29937b515 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj index cbec3e0180..6566c17b4b 100644 --- a/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj +++ b/test/OpenApiEndToEndTests/OpenApiEndToEndTests.csproj @@ -28,7 +28,7 @@ HeadersClient HeadersClient.cs NSwagCSharp - /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateOptionalParameters:true /GenerateNullableReferenceTypes:true + /ClientClassAccessModifier:internal /GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client /GenerateNullableReferenceTypes:true OpenApiEndToEndTests.QueryStrings.GeneratedCode diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 34ded764bd..32655a0e00 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1041,7 +1041,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1106,7 +1106,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1304,7 +1304,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1378,7 +1378,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1612,7 +1612,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1686,7 +1686,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1787,7 +1787,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1861,7 +1861,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2163,7 +2163,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2237,7 +2237,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2338,7 +2338,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2412,7 +2412,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2580,7 +2580,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2654,7 +2654,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2755,7 +2755,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2829,7 +2829,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index 4b2a4eba6e..a6db61ac91 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -80,7 +80,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(3); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscrapers, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -106,7 +106,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -158,7 +158,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscraper."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -187,7 +187,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -263,7 +263,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -292,7 +292,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -322,7 +322,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator identity, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -351,7 +351,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -404,7 +404,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found spaces, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -433,7 +433,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -463,7 +463,7 @@ public async Task Endpoints_are_documented() responsesElement.EnumerateObject().ShouldHaveCount(4); responsesElement.Should().HaveProperty("200.description", "Successfully returns the found space identities, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -492,7 +492,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "The operation completed successfully."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); - responsesElement.Should().HaveProperty("304.description", "The resource was not modified."); + responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); diff --git a/test/OpenApiTests/Headers/Country.cs b/test/OpenApiTests/Headers/Country.cs index 4df014bcab..d58e2189f8 100644 --- a/test/OpenApiTests/Headers/Country.cs +++ b/test/OpenApiTests/Headers/Country.cs @@ -12,5 +12,5 @@ public sealed class Country : Identifiable public string Name { get; set; } = null!; [Attr] - public int Population { get; set; } + public long Population { get; set; } } diff --git a/test/OpenApiTests/Headers/HeaderStringFakers.cs b/test/OpenApiTests/Headers/HeaderStringFakers.cs index 9d9a69aea9..2a05345748 100644 --- a/test/OpenApiTests/Headers/HeaderStringFakers.cs +++ b/test/OpenApiTests/Headers/HeaderStringFakers.cs @@ -13,7 +13,7 @@ public sealed class HeaderFakers : FakerContainer private readonly Lazy> _lazyCountryFaker = new(() => new Faker() .UseSeed(GetFakerSeed()) .RuleFor(country => country.Name, faker => faker.Address.Country()) - .RuleFor(country => country.Population, faker => faker.Random.Number())); + .RuleFor(country => country.Population, faker => faker.Random.Long(0, 2_000_000_000))); public Faker Country => _lazyCountryFaker.Value; } diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index d1846d8dd0..ceddb6ad69 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -72,7 +72,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -137,7 +137,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -335,7 +335,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -409,7 +409,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -643,7 +643,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -717,7 +717,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -818,7 +818,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -892,7 +892,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1175,7 +1175,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1240,7 +1240,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1438,7 +1438,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1512,7 +1512,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1746,7 +1746,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1820,7 +1820,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1921,7 +1921,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -1995,7 +1995,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2297,7 +2297,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2371,7 +2371,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2472,7 +2472,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2546,7 +2546,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2829,7 +2829,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -2894,7 +2894,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3092,7 +3092,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3166,7 +3166,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3400,7 +3400,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3474,7 +3474,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3575,7 +3575,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3649,7 +3649,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3817,7 +3817,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3891,7 +3891,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -3992,7 +3992,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4066,7 +4066,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4368,7 +4368,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4442,7 +4442,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4543,7 +4543,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4617,7 +4617,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4919,7 +4919,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -4993,7 +4993,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5094,7 +5094,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5168,7 +5168,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5317,7 +5317,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5382,7 +5382,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5580,7 +5580,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", @@ -5654,7 +5654,7 @@ } }, "304": { - "description": "The resource was not modified.", + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { "ETag": { "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", From d4ad3a63328485296adcb7330574aa15d1988f94 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Mon, 19 Feb 2024 17:58:49 -0500 Subject: [PATCH 19/36] Address PR comments (2/2) --- .../JsonApiDotNetCoreExample.json | 429 +++++++------- .../OpenApiEndpointConvention.cs | 7 +- .../LegacyClient/swagger.g.json | 524 +++++++++--------- .../CamelCase/swagger.g.json | 238 ++++---- .../KebabCase/swagger.g.json | 238 ++++---- .../PascalCase/swagger.g.json | 238 ++++---- .../ModelStateValidationOff/swagger.g.json | 239 ++++---- .../ModelStateValidationOn/swagger.g.json | 239 ++++---- .../ModelStateValidationOff/swagger.g.json | 335 +++++------ .../ModelStateValidationOn/swagger.g.json | 335 +++++------ .../OpenApiEndToEndTests/Headers/ETagTests.cs | 126 +++-- .../Headers/swagger.g.json | 53 +- .../QueryStrings/swagger.g.json | 286 +++++----- .../LegacyOpenApiIntegration/swagger.json | 524 +++++++++--------- 14 files changed, 1950 insertions(+), 1861 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 1314fdc7f7..b4187413dd 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1173,6 +1174,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1192,18 +1205,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1348,6 +1349,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1367,18 +1380,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1715,16 +1716,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -1736,6 +1727,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -1850,7 +1851,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -1968,6 +1970,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1987,18 +2001,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2276,6 +2278,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2295,18 +2309,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2451,6 +2453,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2470,18 +2484,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2818,16 +2820,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -2839,6 +2831,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -2953,7 +2955,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -3071,6 +3074,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3090,18 +3105,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3379,6 +3382,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3398,18 +3413,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3554,6 +3557,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3573,18 +3588,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3796,6 +3799,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3815,18 +3830,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3971,6 +3974,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3990,18 +4005,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4213,6 +4216,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4232,18 +4247,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4388,6 +4391,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4407,18 +4422,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs b/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs index 5def543904..1a9a71a5ba 100644 --- a/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs +++ b/src/JsonApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs @@ -147,8 +147,11 @@ private static IEnumerable GetSuccessStatusCodesForEndpoint(Json { return endpoint switch { - JsonApiEndpoint.GetCollection or JsonApiEndpoint.GetSingle or JsonApiEndpoint.GetSecondary or JsonApiEndpoint.GetRelationship - => [HttpStatusCode.OK, HttpStatusCode.NotModified], + JsonApiEndpoint.GetCollection or JsonApiEndpoint.GetSingle or JsonApiEndpoint.GetSecondary or JsonApiEndpoint.GetRelationship => + [ + HttpStatusCode.OK, + HttpStatusCode.NotModified + ], JsonApiEndpoint.Post => [ HttpStatusCode.Created, diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index c5914a18d7..65e02ec2ce 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1164,16 +1165,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -1185,6 +1176,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -1299,7 +1300,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -1417,6 +1419,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1436,18 +1450,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1725,6 +1727,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1744,18 +1758,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1900,6 +1902,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1919,18 +1933,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2276,6 +2278,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2295,18 +2309,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2451,6 +2453,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2470,18 +2484,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2818,16 +2820,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -2839,6 +2831,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -2953,7 +2955,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -3071,6 +3074,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3090,18 +3105,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3379,6 +3382,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3398,18 +3413,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3554,6 +3557,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3573,18 +3588,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3796,6 +3799,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3815,18 +3830,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3971,6 +3974,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3990,18 +4005,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4347,6 +4350,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4366,18 +4381,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4522,6 +4525,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4541,18 +4556,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4898,6 +4901,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4917,18 +4932,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -5073,6 +5076,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -5092,18 +5107,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -5306,16 +5309,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -5327,6 +5320,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -5441,7 +5444,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -5559,6 +5563,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -5578,18 +5594,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 06d252c5f8..e6a5ba1972 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -613,16 +614,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -634,6 +625,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -748,7 +749,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -866,6 +868,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -885,18 +899,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1174,6 +1176,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1193,18 +1207,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1349,6 +1351,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1368,18 +1382,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1591,6 +1593,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1610,18 +1624,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1766,6 +1768,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1785,18 +1799,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2142,6 +2144,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2161,18 +2175,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2317,6 +2319,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2336,18 +2350,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 2d1a3430a1..d729a9f733 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -613,16 +614,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -634,6 +625,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -748,7 +749,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -866,6 +868,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -885,18 +899,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1174,6 +1176,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1193,18 +1207,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1349,6 +1351,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1368,18 +1382,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1591,6 +1593,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1610,18 +1624,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1766,6 +1768,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1785,18 +1799,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2142,6 +2144,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2161,18 +2175,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2317,6 +2319,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2336,18 +2350,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 5003a43948..37bb907cae 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -613,16 +614,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -634,6 +625,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseDocument" + } + } + } } } }, @@ -748,7 +749,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -866,6 +868,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -885,18 +899,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1174,6 +1176,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1193,18 +1207,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1349,6 +1351,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1368,18 +1382,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1591,6 +1593,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1610,18 +1624,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1766,6 +1768,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1785,18 +1799,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2142,6 +2144,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2161,18 +2175,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2317,6 +2319,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2336,18 +2350,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index a87580d120..202e86cf8d 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1173,6 +1174,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1192,18 +1205,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1348,6 +1349,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1367,18 +1380,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1590,6 +1591,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1609,18 +1622,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1765,6 +1766,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1784,18 +1797,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2141,6 +2142,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2160,18 +2173,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2316,6 +2317,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2335,18 +2348,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 307a570598..bd791f44a7 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1173,6 +1174,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1192,18 +1205,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1348,6 +1349,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1367,18 +1380,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1590,6 +1591,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1609,18 +1622,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1765,6 +1766,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1784,18 +1797,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2141,6 +2142,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2160,18 +2173,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2316,6 +2317,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2335,18 +2348,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 0464fafca3..944363383b 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1039,6 +1040,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1058,18 +1071,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1214,6 +1215,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1233,18 +1246,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1456,6 +1457,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1475,18 +1488,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1631,6 +1632,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1650,18 +1663,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1873,6 +1874,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1892,18 +1905,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2048,6 +2049,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2067,18 +2080,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2290,6 +2291,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2309,18 +2322,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2465,6 +2466,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2484,18 +2497,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2841,6 +2842,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2860,18 +2873,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3016,6 +3017,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3035,18 +3048,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 2c1ee34952..28d192d6bb 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1039,6 +1040,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1058,18 +1071,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1214,6 +1215,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1233,18 +1246,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1456,6 +1457,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1475,18 +1488,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1631,6 +1632,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1650,18 +1663,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1873,6 +1874,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1892,18 +1905,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2048,6 +2049,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2067,18 +2080,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2290,6 +2291,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2309,18 +2322,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2465,6 +2466,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2484,18 +2497,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2841,6 +2842,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2860,18 +2873,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3016,6 +3017,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3035,18 +3048,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 641a7b8553..76f07481fa 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -23,15 +23,15 @@ public ETagTests(IntegrationTestContext, Header } [Fact] - public async Task Get_should_return_etag() + public async Task Returns_ETag_for_HEAD_request() { // Arrange - Country country = _fakers.Country.Generate(); + List countries = _fakers.Country.Generate(2); await _testContext.RunOnDatabaseAsync(async dbContext => { await dbContext.ClearTableAsync(); - dbContext.Countries.Add(country); + dbContext.Countries.AddRange(countries); await dbContext.SaveChangesAsync(); }); @@ -39,23 +39,24 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new HeadersClient(httpClient); // Act - ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); + ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.HeadCountryCollectionAsync(null, null)); // Assert response.StatusCode.Should().Be((int)HttpStatusCode.OK); + response.Headers.Should().ContainKey(HeaderNames.ETag); } [Fact] - public async Task Getting_twice_unmodified_resource_should_return_304() + public async Task Returns_ETag_for_GET_request() { // Arrange - Country country = _fakers.Country.Generate(); + List countries = _fakers.Country.Generate(2); await _testContext.RunOnDatabaseAsync(async dbContext => { await dbContext.ClearTableAsync(); - dbContext.Countries.Add(country); + dbContext.Countries.AddRange(countries); await dbContext.SaveChangesAsync(); }); @@ -63,54 +64,115 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new HeadersClient(httpClient); // Act - ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); - string etag = response1.Headers[HeaderNames.ETag].First(); + ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.HeadCountryCollectionAsync(null, null)); + + // Assert + response.StatusCode.Should().Be((int)HttpStatusCode.OK); + + response.Headers.Should().ContainKey(HeaderNames.ETag); + } - ApiResponse response2 = - await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!, if_None_Match: etag)); + [Fact] + public async Task Returns_no_ETag_for_failed_GET_request() + { + // Arrange + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + Func>> act = () => + ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(Unknown.StringId.For(), null, null)); // Assert - response2.StatusCode.Should().Be((int)HttpStatusCode.NotModified); - response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().Equal([etag]); + ApiException? exception = (await act.Should().ThrowExactlyAsync>()).And; + exception.StatusCode.Should().Be((int)HttpStatusCode.NotFound); + exception.Headers.Should().NotContainKey(HeaderNames.ETag); } [Fact] - public async Task Getting_twice_modified_resource_should_return_200() + public async Task Returns_no_ETag_for_POST_request() { // Arrange - Country country = _fakers.Country.Generate(); + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.PostCountryAsync(null, + new CountryPostRequestDocument + { + Data = new CountryDataInPostRequest + { + Attributes = new CountryAttributesInPostRequest + { + Name = _fakers.Country.Generate().Name, + Population = _fakers.Country.Generate().Population + } + } + })); + + // Assert + response.StatusCode.Should().Be((int)HttpStatusCode.Created); + + response.Headers.Should().NotContainKey(HeaderNames.ETag); + } + + [Fact] + public async Task Returns_NotModified_for_matching_ETag() + { + // Arrange + List countries = _fakers.Country.Generate(2); await _testContext.RunOnDatabaseAsync(async dbContext => { await dbContext.ClearTableAsync(); - dbContext.Countries.Add(country); + dbContext.Countries.AddRange(countries); await dbContext.SaveChangesAsync(); }); using HttpClient httpClient = _testContext.Factory.CreateClient(); var apiClient = new HeadersClient(httpClient); + ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryCollectionAsync(null, null)); + + string responseETag = response1.Headers[HeaderNames.ETag].First(); + // Act - ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!)); - string etag = response1.Headers[HeaderNames.ETag].First(); + ApiResponse response2 = + await ApiResponse.TranslateAsync(() => apiClient.GetCountryCollectionAsync(null, responseETag)); + + // Assert + response2.StatusCode.Should().Be((int)HttpStatusCode.NotModified); + + response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().Equal([responseETag]); + + response2.Result.Should().BeNull(); + } + + [Fact] + public async Task Returns_content_for_mismatching_ETag() + { + // Arrange + List countries = _fakers.Country.Generate(2); - await ApiResponse.TranslateAsync(() => apiClient.PatchCountryAsync(country.StringId!, body: new CountryPatchRequestDocument + await _testContext.RunOnDatabaseAsync(async dbContext => { - Data = new CountryDataInPatchRequest - { - Id = country.StringId!, - Attributes = new CountryAttributesInPatchRequest - { - Name = _fakers.Country.Generate().Name - } - } - })); + await dbContext.ClearTableAsync(); + dbContext.Countries.AddRange(countries); + await dbContext.SaveChangesAsync(); + }); - ApiResponse response3 = - await ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(country.StringId!, if_None_Match: etag)); + using HttpClient httpClient = _testContext.Factory.CreateClient(); + var apiClient = new HeadersClient(httpClient); + + // Act + ApiResponse response2 = + await ApiResponse.TranslateAsync(() => apiClient.GetCountryCollectionAsync(null, "\"Not-a-matching-value\"")); // Assert - response3.StatusCode.Should().Be((int)HttpStatusCode.OK); - response3.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotEqual([etag]); + response2.StatusCode.Should().Be((int)HttpStatusCode.OK); + + response2.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotBeNullOrEmpty(); + + response2.Result.ShouldNotBeNull(); } } diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index a29937b515..81c0fed38f 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -573,7 +574,7 @@ }, "population": { "type": "integer", - "format": "int32" + "format": "int64" } }, "additionalProperties": false @@ -589,7 +590,7 @@ }, "population": { "type": "integer", - "format": "int32" + "format": "int64" } }, "additionalProperties": false @@ -602,7 +603,7 @@ }, "population": { "type": "integer", - "format": "int32" + "format": "int64" } }, "additionalProperties": false diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 32655a0e00..0be4fd2ddf 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1030,16 +1031,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/errorResponseDocument" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -1051,6 +1042,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } } } }, @@ -1165,7 +1166,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -1283,6 +1285,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1302,18 +1316,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1591,6 +1593,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1610,18 +1624,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1766,6 +1768,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1785,18 +1799,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2142,6 +2144,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2161,18 +2175,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2317,6 +2319,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2336,18 +2350,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2559,6 +2561,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2578,18 +2592,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2734,6 +2736,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2753,18 +2767,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index ceddb6ad69..962b59c030 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -61,16 +61,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -82,6 +72,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -196,7 +196,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -314,6 +315,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -333,18 +346,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -622,6 +623,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -641,18 +654,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -797,6 +798,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -816,18 +829,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1164,16 +1165,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -1185,6 +1176,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -1299,7 +1300,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -1417,6 +1419,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1436,18 +1450,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1725,6 +1727,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1744,18 +1758,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -1900,6 +1902,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -1919,18 +1933,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2276,6 +2278,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2295,18 +2309,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2451,6 +2453,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -2470,18 +2484,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -2818,16 +2820,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -2839,6 +2831,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -2953,7 +2955,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -3071,6 +3074,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3090,18 +3105,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3379,6 +3382,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3398,18 +3413,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3554,6 +3557,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3573,18 +3588,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3796,6 +3799,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3815,18 +3830,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -3971,6 +3974,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -3990,18 +4005,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4347,6 +4350,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4366,18 +4381,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4522,6 +4525,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4541,18 +4556,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -4898,6 +4901,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -4917,18 +4932,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -5073,6 +5076,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -5092,18 +5107,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, @@ -5306,16 +5309,6 @@ } } }, - "400": { - "description": "The query string is invalid.", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/error-response-document" - } - } - } - }, "304": { "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", "headers": { @@ -5327,6 +5320,16 @@ } } } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/error-response-document" + } + } + } } } }, @@ -5441,7 +5444,8 @@ "description": "The URL at which the newly created JSON:API resource can be retrieved.", "required": true, "schema": { - "type": "uri" + "type": "string", + "format": "uri" } } }, @@ -5559,6 +5563,18 @@ } } }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The query string is invalid.", "content": { @@ -5578,18 +5594,6 @@ } } } - }, - "304": { - "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", - "headers": { - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", - "required": true, - "schema": { - "type": "string" - } - } - } } } }, From d5b7a40d0d259beda9bfa0a23d7c6e77b0ad5007 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Tue, 20 Feb 2024 21:25:24 -0500 Subject: [PATCH 20/36] Add HeaderTests --- .../Headers/swagger.g.json | 853 +++++++++++++++++- test/OpenApiTests/Headers/Country.cs | 3 + test/OpenApiTests/Headers/HeaderTests.cs | 129 ++- test/OpenApiTests/Headers/HeadersDbContext.cs | 1 + test/OpenApiTests/Headers/Language.cs | 16 + 5 files changed, 996 insertions(+), 6 deletions(-) create mode 100644 test/OpenApiTests/Headers/Language.cs diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index 81c0fed38f..6d909411e1 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -562,6 +562,557 @@ } } } + }, + "/countries/{id}/languages": { + "get": { + "tags": [ + "countries" + ], + "summary": "Retrieves the related languages of an individual country's languages relationship.", + "operationId": "getCountryLanguages", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country whose related languages to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returns the found languages, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/languageCollectionResponseDocument" + } + } + } + }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + }, + "head": { + "tags": [ + "countries" + ], + "summary": "Retrieves the related languages of an individual country's languages relationship without returning them.", + "description": "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.", + "operationId": "headCountryLanguages", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country whose related languages to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + }, + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", + "required": true, + "schema": { + "type": "integer" + } + } + } + }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid." + }, + "404": { + "description": "The country does not exist." + } + } + } + }, + "/countries/{id}/relationships/languages": { + "get": { + "tags": [ + "countries" + ], + "summary": "Retrieves the related language identities of an individual country's languages relationship.", + "operationId": "getCountryLanguagesRelationship", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country whose related language identities to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Successfully returns the found language identities, or an empty array if none were found.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/languageIdentifierCollectionResponseDocument" + } + } + } + }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + }, + "head": { + "tags": [ + "countries" + ], + "summary": "Retrieves the related language identities of an individual country's languages relationship without returning them.", + "description": "Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.", + "operationId": "headCountryLanguagesRelationship", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country whose related language identities to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "in": "query", + "description": "For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "example": "" + } + }, + { + "name": "If-None-Match", + "in": "header", + "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "headers": { + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", + "required": true, + "schema": { + "type": "integer" + } + }, + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "304": { + "description": "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header.", + "headers": { + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "The query string is invalid." + }, + "404": { + "description": "The country does not exist." + } + } + }, + "post": { + "tags": [ + "countries" + ], + "summary": "Adds existing languages to the languages relationship of an individual country.", + "operationId": "postCountryLanguagesRelationship", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to add languages to.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The identities of the languages to add to the languages relationship.", + "content": { + "application/vnd.api+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInRequest" + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "The languages were successfully added, which did not result in additional changes." + }, + "400": { + "description": "The request body is missing or malformed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "409": { + "description": "A resource type in the request body is incompatible.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + }, + "patch": { + "tags": [ + "countries" + ], + "summary": "Assigns existing languages to the languages relationship of an individual country.", + "operationId": "patchCountryLanguagesRelationship", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country whose languages relationship to assign.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The identities of the languages to assign to the languages relationship, or an empty array to clear the relationship.", + "content": { + "application/vnd.api+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInRequest" + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "The languages relationship was successfully updated, which did not result in additional changes." + }, + "400": { + "description": "The request body is missing or malformed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "409": { + "description": "A resource type in the request body is incompatible.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + }, + "delete": { + "tags": [ + "countries" + ], + "summary": "Removes existing languages from the languages relationship of an individual country.", + "operationId": "deleteCountryLanguagesRelationship", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The identifier of the country to remove languages from.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The identities of the languages to remove from the languages relationship.", + "content": { + "application/vnd.api+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInRequest" + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "The languages were successfully removed, which did not result in additional changes." + }, + "400": { + "description": "The request body is missing or malformed.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "404": { + "description": "The country does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + }, + "409": { + "description": "A resource type in the request body is incompatible.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/errorResponseDocument" + } + } + } + } + } + } } }, "components": { @@ -658,10 +1209,17 @@ "minLength": 1, "type": "string" }, - "attributes": { + "attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/countryAttributesInPatchRequest" + } + ] + }, + "relationships": { "allOf": [ { - "$ref": "#/components/schemas/countryAttributesInPatchRequest" + "$ref": "#/components/schemas/countryRelationshipsInPatchRequest" } ] } @@ -683,6 +1241,13 @@ "$ref": "#/components/schemas/countryAttributesInPostRequest" } ] + }, + "relationships": { + "allOf": [ + { + "$ref": "#/components/schemas/countryRelationshipsInPostRequest" + } + ] } }, "additionalProperties": false @@ -705,6 +1270,13 @@ } ] }, + "relationships": { + "allOf": [ + { + "$ref": "#/components/schemas/countryRelationshipsInResponse" + } + ] + }, "links": { "allOf": [ { @@ -794,6 +1366,45 @@ }, "additionalProperties": false }, + "countryRelationshipsInPatchRequest": { + "type": "object", + "properties": { + "languages": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryRelationshipsInPostRequest": { + "type": "object", + "properties": { + "languages": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInRequest" + } + ] + } + }, + "additionalProperties": false + }, + "countryRelationshipsInResponse": { + "type": "object", + "properties": { + "languages": { + "allOf": [ + { + "$ref": "#/components/schemas/toManyLanguageInResponse" + } + ] + } + }, + "additionalProperties": false + }, "countryResourceType": { "enum": [ "countries" @@ -821,7 +1432,8 @@ "discriminator": { "propertyName": "type", "mapping": { - "countries": "#/components/schemas/countryDataInResponse" + "countries": "#/components/schemas/countryDataInResponse", + "languages": "#/components/schemas/languageDataInResponse" } }, "x-abstract": true @@ -919,6 +1531,164 @@ }, "additionalProperties": false }, + "languageAttributesInResponse": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "languageCollectionResponseDocument": { + "required": [ + "data", + "links" + ], + "type": "object", + "properties": { + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceCollectionDocument" + } + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/languageDataInResponse" + } + }, + "included": { + "type": "array", + "items": { + "$ref": "#/components/schemas/dataInResponse" + } + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + }, + "languageDataInResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/dataInResponse" + }, + { + "required": [ + "links" + ], + "type": "object", + "properties": { + "attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/languageAttributesInResponse" + } + ] + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceData" + } + ] + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + } + ], + "additionalProperties": false + }, + "languageIdentifier": { + "required": [ + "id", + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/languageResourceType" + }, + "id": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "languageIdentifierCollectionResponseDocument": { + "required": [ + "data", + "links" + ], + "type": "object", + "properties": { + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInResourceIdentifierCollectionDocument" + } + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/languageIdentifier" + } + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false + }, + "languageResourceType": { + "enum": [ + "languages" + ], + "type": "string", + "additionalProperties": false + }, + "linksInRelationship": { + "required": [ + "related", + "self" + ], + "type": "object", + "properties": { + "self": { + "minLength": 1, + "type": "string" + }, + "related": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, "linksInResourceCollectionDocument": { "required": [ "self" @@ -975,6 +1745,83 @@ } }, "additionalProperties": false + }, + "linksInResourceIdentifierCollectionDocument": { + "required": [ + "related", + "self" + ], + "type": "object", + "properties": { + "self": { + "minLength": 1, + "type": "string" + }, + "related": { + "minLength": 1, + "type": "string" + }, + "describedby": { + "type": "string" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + }, + "prev": { + "type": "string" + }, + "next": { + "type": "string" + } + }, + "additionalProperties": false + }, + "toManyLanguageInRequest": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/languageIdentifier" + } + } + }, + "additionalProperties": false + }, + "toManyLanguageInResponse": { + "required": [ + "links" + ], + "type": "object", + "properties": { + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/linksInRelationship" + } + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/languageIdentifier" + } + }, + "meta": { + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } + } + }, + "additionalProperties": false } } } diff --git a/test/OpenApiTests/Headers/Country.cs b/test/OpenApiTests/Headers/Country.cs index d58e2189f8..a0398c03bc 100644 --- a/test/OpenApiTests/Headers/Country.cs +++ b/test/OpenApiTests/Headers/Country.cs @@ -13,4 +13,7 @@ public sealed class Country : Identifiable [Attr] public long Population { get; set; } + + [HasMany] + public ISet Languages { get; set; } = new HashSet(); } diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index 7bc8c1fae8..981dcc6f14 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -1,3 +1,6 @@ +using System.Text.Json; +using FluentAssertions; +using TestBuildingBlocks; using Xunit; namespace OpenApiTests.Headers; @@ -15,9 +18,129 @@ public HeaderTests(OpenApiTestContext, HeadersD testContext.SwaggerDocumentOutputDirectory = "test/OpenApiEndToEndTests/Headers"; } - [Fact] - public Task Dummy() + [Theory] + [InlineData("/countries.get")] + [InlineData("/countries.head")] + [InlineData("/countries/{id}.get")] + [InlineData("/countries/{id}.head")] + [InlineData("/countries/{id}/languages.get")] + [InlineData("/countries/{id}/languages.head")] + [InlineData("/countries/{id}/relationships/languages.get")] + [InlineData("/countries/{id}/relationships/languages.head")] + public async Task Get_and_head_endpoints_have_caching_headers(string endpointPath) { - return _testContext.GetSwaggerDocumentAsync(); + // Act + JsonElement document = await _testContext.GetSwaggerDocumentAsync(); + + // Assert + document.Should().ContainPath($"paths.{endpointPath}.parameters").With(parametersElement => + { + parametersElement.EnumerateArray().Should().ContainSingle(parameterElement => parameterElement.GetProperty("in").ValueEquals("header")).Subject + .With(parameterElement => + { + parameterElement.Should().HaveProperty("name", "If-None-Match"); + + parameterElement.Should().HaveProperty("description", + "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); + + parameterElement.Should().ContainPath("schema").With(schemaElement => + { + schemaElement.Should().HaveProperty("type", "string"); + schemaElement.Should().HaveProperty("nullable", true); + }); + }); + }); + + document.Should().ContainPath($"paths.{endpointPath}.responses.200.headers.ETag").With(AssertEtag); + document.Should().ContainPath($"paths.{endpointPath}.responses.304.headers.ETag").With(AssertEtag); + + return; + + void AssertEtag(JsonElement etagElement) + { + etagElement.Should().HaveProperty("description", + "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); + + etagElement.Should().HaveProperty("required", true); + + etagElement.Should().ContainPath("schema").With(schemaElement => + { + schemaElement.Should().HaveProperty("type", "string"); + }); + } + } + + [Theory] + [InlineData("/countries.post")] + [InlineData("/countries/{id}.patch")] + [InlineData("/countries/{id}.delete")] + [InlineData("/countries/{id}/relationships/languages.post")] + [InlineData("/countries/{id}/relationships/languages.patch")] + [InlineData("/countries/{id}/relationships/languages.delete")] + public async Task Post_patch_and_delete_endpoints_do_not_have_caching_headers(string endpointPath) + { + // Act + JsonElement document = await _testContext.GetSwaggerDocumentAsync(); + + // Assert + document.Should().ContainPath($"paths.{endpointPath}.responses").With(responsesElement => + { + foreach (JsonProperty responseProperty in responsesElement.EnumerateObject()) + { + responseProperty.Value.Should().NotContainPath("headers.ETag"); + responseProperty.Value.Should().NotContainPath("headers.Content-Length"); + } + }); + + document.Should().ContainPath($"paths.{endpointPath}.parameters").With(parametersElement => + { + parametersElement.EnumerateArray().Should().NotContain(parameterElement => parameterElement.GetProperty("name").ValueEquals("If-None-Match")); + }); + } + + [Theory] + [InlineData("/countries.head")] + [InlineData("/countries/{id}.head")] + [InlineData("/countries/{id}/languages.head")] + [InlineData("/countries/{id}/relationships/languages.head")] + public async Task Head_endpoints_have_content_length_response_header(string endpointPath) + { + // Act + JsonElement document = await _testContext.GetSwaggerDocumentAsync(); + + // Assert + document.Should().ContainPath($"paths.{endpointPath}.responses.200.headers.Content-Length").With(contentLengthElement => + { + contentLengthElement.Should().HaveProperty("description", "Size of the HTTP response body, in bytes."); + + contentLengthElement.Should().HaveProperty("required", true); + + contentLengthElement.Should().ContainPath("schema").With(schemaElement => + { + schemaElement.Should().HaveProperty("type", "integer"); + }); + }); + } + + [Theory] + [InlineData("/countries.post")] + public async Task Post_endpoints_have_location_response_header(string endpointPath) + { + // Act + JsonElement document = await _testContext.GetSwaggerDocumentAsync(); + + // Assert + document.Should().ContainPath($"paths.{endpointPath}.responses.201.headers.Location").With(locationElement => + { + locationElement.Should().HaveProperty("description", "The URL at which the newly created JSON:API resource can be retrieved."); + + locationElement.Should().HaveProperty("required", true); + + locationElement.Should().ContainPath("schema").With(schemaElement => + { + schemaElement.Should().HaveProperty("type", "string"); + schemaElement.Should().HaveProperty("format", "uri"); + }); + }); } } diff --git a/test/OpenApiTests/Headers/HeadersDbContext.cs b/test/OpenApiTests/Headers/HeadersDbContext.cs index 77dfea076b..937ec35d27 100644 --- a/test/OpenApiTests/Headers/HeadersDbContext.cs +++ b/test/OpenApiTests/Headers/HeadersDbContext.cs @@ -8,4 +8,5 @@ namespace OpenApiTests.Headers; public sealed class HeadersDbContext(DbContextOptions options) : TestableDbContext(options) { public DbSet Countries => Set(); + public DbSet Languages => Set(); } diff --git a/test/OpenApiTests/Headers/Language.cs b/test/OpenApiTests/Headers/Language.cs new file mode 100644 index 0000000000..3f2eae5ff3 --- /dev/null +++ b/test/OpenApiTests/Headers/Language.cs @@ -0,0 +1,16 @@ +using JetBrains.Annotations; +using JsonApiDotNetCore.Resources; +using JsonApiDotNetCore.Resources.Annotations; + +namespace OpenApiTests.Headers; + +[UsedImplicitly(ImplicitUseTargetFlags.Members)] +[Resource(ControllerNamespace = "OpenApiTests.Headers")] +public sealed class Language : Identifiable +{ + [Attr] + public string Code { get; set; } = null!; + + [Attr] + public string Name { get; set; } = null!; +} From 1a8cc525e84790251585763fc513071d547ef248 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Tue, 20 Feb 2024 22:27:10 -0500 Subject: [PATCH 21/36] Fix inspection --- test/OpenApiTests/Headers/HeaderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index 981dcc6f14..a6e87e7d1e 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -56,7 +56,7 @@ public async Task Get_and_head_endpoints_have_caching_headers(string endpointPat return; - void AssertEtag(JsonElement etagElement) + static void AssertEtag(JsonElement etagElement) { etagElement.Should().HaveProperty("description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); From 09338e100d17c6d8c22f29bfc8d0d7762299ed60 Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 21 Feb 2024 14:21:51 -0500 Subject: [PATCH 22/36] Address PR comments --- .../JsonApiDotNetCoreExample.json | 108 +++++--------- .../JsonApiOperationDocumentationFilter.cs | 3 +- .../LegacyClient/swagger.g.json | 132 ++++++------------ .../CamelCase/swagger.g.json | 60 +++----- .../KebabCase/swagger.g.json | 60 +++----- .../PascalCase/swagger.g.json | 60 +++----- .../ModelStateValidationOff/swagger.g.json | 60 +++----- .../ModelStateValidationOn/swagger.g.json | 60 +++----- .../ModelStateValidationOff/swagger.g.json | 84 ++++------- .../ModelStateValidationOn/swagger.g.json | 84 ++++------- .../Headers/swagger.g.json | 24 ++-- .../QueryStrings/swagger.g.json | 72 ++++------ ...{HeaderStringFakers.cs => HeaderFakers.cs} | 6 + test/OpenApiTests/Headers/HeaderTests.cs | 32 ++--- .../LegacyOpenApiIntegration/swagger.json | 132 ++++++------------ 15 files changed, 334 insertions(+), 643 deletions(-) rename test/OpenApiTests/Headers/{HeaderStringFakers.cs => HeaderFakers.cs} (66%) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index b4187413dd..77866e2821 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1149,8 +1141,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1243,8 +1234,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1324,8 +1314,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1418,8 +1407,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1691,8 +1679,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1766,8 +1753,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1945,8 +1931,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2039,8 +2024,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2253,8 +2237,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2347,8 +2330,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2428,8 +2410,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2522,8 +2503,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2795,8 +2775,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2870,8 +2849,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3049,8 +3027,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3143,8 +3120,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3357,8 +3333,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3451,8 +3426,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3532,8 +3506,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3626,8 +3599,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3774,8 +3746,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3868,8 +3839,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3949,8 +3919,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4043,8 +4012,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4191,8 +4159,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4285,8 +4252,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4366,8 +4332,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4460,8 +4425,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index b1bc33d17b..3271b93e59 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -563,8 +563,7 @@ private static void AddRequestHeaderIfNoneMatch(OpenApiOperation operation) Description = "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", Schema = new OpenApiSchema { - Type = "string", - Nullable = true + Type = "string" } }); } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index 65e02ec2ce..b51fdafcc0 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1140,8 +1132,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1215,8 +1206,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1394,8 +1384,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1488,8 +1477,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1702,8 +1690,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1796,8 +1783,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1877,8 +1863,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1971,8 +1956,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2253,8 +2237,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2347,8 +2330,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2428,8 +2410,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2522,8 +2503,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2795,8 +2775,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2870,8 +2849,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3049,8 +3027,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3143,8 +3120,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3357,8 +3333,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3451,8 +3426,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3532,8 +3506,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3626,8 +3599,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3774,8 +3746,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3868,8 +3839,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3949,8 +3919,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4043,8 +4012,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4325,8 +4293,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4419,8 +4386,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4500,8 +4466,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4594,8 +4559,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4876,8 +4840,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4970,8 +4933,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5051,8 +5013,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5145,8 +5106,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5284,8 +5244,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5359,8 +5318,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5538,8 +5496,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5632,8 +5589,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index e6a5ba1972..0129f17ba0 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -589,8 +585,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -664,8 +659,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -843,8 +837,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -937,8 +930,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1151,8 +1143,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1245,8 +1236,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1326,8 +1316,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1420,8 +1409,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1568,8 +1556,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1662,8 +1649,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1743,8 +1729,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1837,8 +1822,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2119,8 +2103,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2213,8 +2196,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2294,8 +2276,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2388,8 +2369,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index d729a9f733..80114c8018 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -589,8 +585,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -664,8 +659,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -843,8 +837,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -937,8 +930,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1151,8 +1143,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1245,8 +1236,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1326,8 +1316,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1420,8 +1409,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1568,8 +1556,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1662,8 +1649,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1743,8 +1729,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1837,8 +1822,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2119,8 +2103,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2213,8 +2196,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2294,8 +2276,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2388,8 +2369,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 37bb907cae..db357bcf7b 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -589,8 +585,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -664,8 +659,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -843,8 +837,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -937,8 +930,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1151,8 +1143,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1245,8 +1236,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1326,8 +1316,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1420,8 +1409,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1568,8 +1556,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1662,8 +1649,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1743,8 +1729,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1837,8 +1822,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2119,8 +2103,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2213,8 +2196,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2294,8 +2276,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2388,8 +2369,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index 202e86cf8d..dcca648082 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1149,8 +1141,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1243,8 +1234,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1324,8 +1314,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1418,8 +1407,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1566,8 +1554,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1660,8 +1647,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1741,8 +1727,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1835,8 +1820,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2117,8 +2101,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2211,8 +2194,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2292,8 +2274,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2386,8 +2367,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index bd791f44a7..a34c8968fb 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1149,8 +1141,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1243,8 +1234,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1324,8 +1314,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1418,8 +1407,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1566,8 +1554,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1660,8 +1647,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1741,8 +1727,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1835,8 +1820,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2117,8 +2101,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2211,8 +2194,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2292,8 +2274,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2386,8 +2367,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 944363383b..d61d9c0062 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1015,8 +1007,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1109,8 +1100,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1190,8 +1180,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1284,8 +1273,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1432,8 +1420,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1526,8 +1513,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1607,8 +1593,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1701,8 +1686,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1849,8 +1833,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1943,8 +1926,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2024,8 +2006,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2118,8 +2099,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2266,8 +2246,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2360,8 +2339,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2441,8 +2419,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2535,8 +2512,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2817,8 +2793,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2911,8 +2886,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2992,8 +2966,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3086,8 +3059,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 28d192d6bb..7f5ab3ba18 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1015,8 +1007,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1109,8 +1100,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1190,8 +1180,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1284,8 +1273,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1432,8 +1420,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1526,8 +1513,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1607,8 +1593,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1701,8 +1686,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1849,8 +1833,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1943,8 +1926,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2024,8 +2006,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2118,8 +2099,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2266,8 +2246,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2360,8 +2339,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2441,8 +2419,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2535,8 +2512,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2817,8 +2793,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2911,8 +2886,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2992,8 +2966,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3086,8 +3059,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index 6d909411e1..fd8cea53e5 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 0be4fd2ddf..ddedb8303d 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1006,8 +998,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1081,8 +1072,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1260,8 +1250,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1354,8 +1343,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1568,8 +1556,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1662,8 +1649,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1743,8 +1729,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1837,8 +1822,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2119,8 +2103,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2213,8 +2196,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2294,8 +2276,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2388,8 +2369,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2536,8 +2516,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2630,8 +2609,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2711,8 +2689,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2805,8 +2782,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], diff --git a/test/OpenApiTests/Headers/HeaderStringFakers.cs b/test/OpenApiTests/Headers/HeaderFakers.cs similarity index 66% rename from test/OpenApiTests/Headers/HeaderStringFakers.cs rename to test/OpenApiTests/Headers/HeaderFakers.cs index 2a05345748..0be7769064 100644 --- a/test/OpenApiTests/Headers/HeaderStringFakers.cs +++ b/test/OpenApiTests/Headers/HeaderFakers.cs @@ -15,5 +15,11 @@ public sealed class HeaderFakers : FakerContainer .RuleFor(country => country.Name, faker => faker.Address.Country()) .RuleFor(country => country.Population, faker => faker.Random.Long(0, 2_000_000_000))); + private readonly Lazy> _lazyLanguageFaker = new(() => new Faker() + .UseSeed(GetFakerSeed()) + .RuleFor(country => country.Name, faker => faker.Random.Word()) + .RuleFor(country => country.Code, faker => faker.Random.String(3))); + public Faker Country => _lazyCountryFaker.Value; + public Faker Language => _lazyLanguageFaker.Value; } diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index a6e87e7d1e..3e9a269649 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -27,7 +27,7 @@ public HeaderTests(OpenApiTestContext, HeadersD [InlineData("/countries/{id}/languages.head")] [InlineData("/countries/{id}/relationships/languages.get")] [InlineData("/countries/{id}/relationships/languages.head")] - public async Task Get_and_head_endpoints_have_caching_headers(string endpointPath) + public async Task Endpoints_have_caching_headers(string endpointPath) { // Act JsonElement document = await _testContext.GetSwaggerDocumentAsync(); @@ -39,6 +39,7 @@ public async Task Get_and_head_endpoints_have_caching_headers(string endpointPat .With(parameterElement => { parameterElement.Should().HaveProperty("name", "If-None-Match"); + parameterElement.Should().NotContainPath("required"); parameterElement.Should().HaveProperty("description", "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint."); @@ -46,17 +47,16 @@ public async Task Get_and_head_endpoints_have_caching_headers(string endpointPat parameterElement.Should().ContainPath("schema").With(schemaElement => { schemaElement.Should().HaveProperty("type", "string"); - schemaElement.Should().HaveProperty("nullable", true); }); }); }); - document.Should().ContainPath($"paths.{endpointPath}.responses.200.headers.ETag").With(AssertEtag); - document.Should().ContainPath($"paths.{endpointPath}.responses.304.headers.ETag").With(AssertEtag); + document.Should().ContainPath($"paths.{endpointPath}.responses.200.headers.ETag").With(AssertETag); + document.Should().ContainPath($"paths.{endpointPath}.responses.304.headers.ETag").With(AssertETag); return; - static void AssertEtag(JsonElement etagElement) + void AssertETag(JsonElement etagElement) { etagElement.Should().HaveProperty("description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); @@ -77,25 +77,24 @@ static void AssertEtag(JsonElement etagElement) [InlineData("/countries/{id}/relationships/languages.post")] [InlineData("/countries/{id}/relationships/languages.patch")] [InlineData("/countries/{id}/relationships/languages.delete")] - public async Task Post_patch_and_delete_endpoints_do_not_have_caching_headers(string endpointPath) + public async Task Endpoints_do_not_have_caching_headers(string endpointPath) { // Act JsonElement document = await _testContext.GetSwaggerDocumentAsync(); // Assert + document.Should().ContainPath($"paths.{endpointPath}.parameters").With(parametersElement => + { + parametersElement.EnumerateArray().Should().NotContain(parameterElement => parameterElement.GetProperty("name").ValueEquals("If-None-Match")); + }); + document.Should().ContainPath($"paths.{endpointPath}.responses").With(responsesElement => { foreach (JsonProperty responseProperty in responsesElement.EnumerateObject()) { responseProperty.Value.Should().NotContainPath("headers.ETag"); - responseProperty.Value.Should().NotContainPath("headers.Content-Length"); } }); - - document.Should().ContainPath($"paths.{endpointPath}.parameters").With(parametersElement => - { - parametersElement.EnumerateArray().Should().NotContain(parameterElement => parameterElement.GetProperty("name").ValueEquals("If-None-Match")); - }); } [Theory] @@ -103,7 +102,7 @@ public async Task Post_patch_and_delete_endpoints_do_not_have_caching_headers(st [InlineData("/countries/{id}.head")] [InlineData("/countries/{id}/languages.head")] [InlineData("/countries/{id}/relationships/languages.head")] - public async Task Head_endpoints_have_content_length_response_header(string endpointPath) + public async Task Endpoints_have_content_length_response_header(string endpointPath) { // Act JsonElement document = await _testContext.GetSwaggerDocumentAsync(); @@ -122,15 +121,14 @@ public async Task Head_endpoints_have_content_length_response_header(string endp }); } - [Theory] - [InlineData("/countries.post")] - public async Task Post_endpoints_have_location_response_header(string endpointPath) + [Fact] + public async Task Post_resource_endpoint_has_location_response_header() { // Act JsonElement document = await _testContext.GetSwaggerDocumentAsync(); // Assert - document.Should().ContainPath($"paths.{endpointPath}.responses.201.headers.Location").With(locationElement => + document.Should().ContainPath("paths./countries.post.responses.201.headers.Location").With(locationElement => { locationElement.Should().HaveProperty("description", "The URL at which the newly created JSON:API resource can be retrieved."); diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index 962b59c030..1615bfae56 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -36,8 +36,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -111,8 +110,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -290,8 +288,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -384,8 +381,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -598,8 +594,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -692,8 +687,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -773,8 +767,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -867,8 +860,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1140,8 +1132,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1215,8 +1206,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1394,8 +1384,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1488,8 +1477,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1702,8 +1690,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1796,8 +1783,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1877,8 +1863,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1971,8 +1956,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2253,8 +2237,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2347,8 +2330,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2428,8 +2410,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2522,8 +2503,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2795,8 +2775,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -2870,8 +2849,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3049,8 +3027,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3143,8 +3120,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3357,8 +3333,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3451,8 +3426,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3532,8 +3506,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3626,8 +3599,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3774,8 +3746,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3868,8 +3839,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3949,8 +3919,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4043,8 +4012,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4325,8 +4293,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4419,8 +4386,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4500,8 +4466,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4594,8 +4559,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4876,8 +4840,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -4970,8 +4933,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5051,8 +5013,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5145,8 +5106,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5284,8 +5244,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5359,8 +5318,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5538,8 +5496,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -5632,8 +5589,7 @@ "in": "header", "description": "A list of ETags, resulting in HTTP status 304 without a body, if one of them matches the current fingerprint.", "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], From 0a6f86fecdb01a0f99937493ecd7b58b0c68fcfe Mon Sep 17 00:00:00 2001 From: verdie-g Date: Wed, 21 Feb 2024 14:30:40 -0500 Subject: [PATCH 23/36] Fix inspection --- test/OpenApiTests/Headers/HeaderTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index 3e9a269649..27a616c468 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -56,7 +56,7 @@ public async Task Endpoints_have_caching_headers(string endpointPath) return; - void AssertETag(JsonElement etagElement) + static void AssertETag(JsonElement etagElement) { etagElement.Should().HaveProperty("description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); From 1b73bfb38123b95392957c3a2e00c3d0d1f91425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:43:01 -0500 Subject: [PATCH 24/36] Update src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- .../SwaggerComponents/JsonApiOperationDocumentationFilter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index 3271b93e59..ef22016b44 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -333,8 +333,8 @@ relationship is HasOneAttribute SetOperationRemarks(operation, TextCompareETag); SetResponseDescription(operation.Responses, HttpStatusCode.OK, TextCompletedSuccessfully); - SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseHeaderETag(operation.Responses, HttpStatusCode.OK); + SetResponseHeaderContentLength(operation.Responses, HttpStatusCode.OK); SetResponseDescription(operation.Responses, HttpStatusCode.NotModified, TextNotModified); SetResponseHeaderETag(operation.Responses, HttpStatusCode.NotModified); } From 4d805f1c41f4d252d9441022ae3c1e55edbdcae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:43:16 -0500 Subject: [PATCH 25/36] Update src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs index 4ee7c10b6d..b719371d58 100644 --- a/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs +++ b/src/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs @@ -7,7 +7,6 @@ namespace JsonApiDotNetCore.OpenApi.Client; public class ApiResponse(int statusCode, IReadOnlyDictionary> headers) { public int StatusCode { get; private set; } = statusCode; - public IReadOnlyDictionary> Headers { get; private set; } = headers; public static async Task TranslateAsync(Func> operation) From 8e21d98f5b1abdad076a1bcfc7b69812c2102b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:43:28 -0500 Subject: [PATCH 26/36] Update test/OpenApiEndToEndTests/Headers/ETagTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 76f07481fa..d9b7fc5c44 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -64,7 +64,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new HeadersClient(httpClient); // Act - ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.HeadCountryCollectionAsync(null, null)); + ApiResponse response = await ApiResponse.TranslateAsync(() => apiClient.GetCountryCollectionAsync(null, null)); // Assert response.StatusCode.Should().Be((int)HttpStatusCode.OK); From ef7f78b24a758627cab3ac8537c0d847f93b94e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:43:35 -0500 Subject: [PATCH 27/36] Update test/OpenApiEndToEndTests/Headers/ETagTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index d9b7fc5c44..1408a5fb77 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -45,6 +45,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => response.StatusCode.Should().Be((int)HttpStatusCode.OK); response.Headers.Should().ContainKey(HeaderNames.ETag); + response.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotBeNullOrEmpty(); } [Fact] From e0833784d22de9529735cfa7b9d5405764d9a707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:43:51 -0500 Subject: [PATCH 28/36] Update test/OpenApiTests/Headers/HeaderTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiTests/Headers/HeaderTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index 27a616c468..f8788fc327 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -117,6 +117,7 @@ public async Task Endpoints_have_content_length_response_header(string endpointP contentLengthElement.Should().ContainPath("schema").With(schemaElement => { schemaElement.Should().HaveProperty("type", "integer"); + schemaElement.Should().HaveProperty("format", "int64"); }); }); } From e9899d9c599af528f2c2f445f296759651aa1a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:44:06 -0500 Subject: [PATCH 29/36] Update test/OpenApiEndToEndTests/Headers/ETagTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 1408a5fb77..e5dbc6a953 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -70,7 +70,9 @@ await _testContext.RunOnDatabaseAsync(async dbContext => // Assert response.StatusCode.Should().Be((int)HttpStatusCode.OK); - response.Headers.Should().ContainKey(HeaderNames.ETag); + response.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotBeNullOrEmpty(); + + response.Result.ShouldNotBeNull(); } [Fact] From 1d4318158dd3a50d41cb8a4d2ba2327e22424475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:44:22 -0500 Subject: [PATCH 30/36] Update test/OpenApiEndToEndTests/Headers/ETagTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index e5dbc6a953..80519491a5 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -87,7 +87,7 @@ public async Task Returns_no_ETag_for_failed_GET_request() ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(Unknown.StringId.For(), null, null)); // Assert - ApiException? exception = (await act.Should().ThrowExactlyAsync>()).And; + ApiException exception = (await act.Should().ThrowExactlyAsync>()).Which; exception.StatusCode.Should().Be((int)HttpStatusCode.NotFound); exception.Headers.Should().NotContainKey(HeaderNames.ETag); } From 6611efb5afc1d97a3ef4caa7b56ceb7a9e1c0110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= Date: Thu, 22 Feb 2024 19:44:35 -0500 Subject: [PATCH 31/36] Update test/OpenApiEndToEndTests/Headers/ETagTests.cs Co-authored-by: Bart Koelman <10324372+bkoelman@users.noreply.github.com> --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 80519491a5..856d2f3f41 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -117,6 +117,8 @@ public async Task Returns_no_ETag_for_POST_request() response.StatusCode.Should().Be((int)HttpStatusCode.Created); response.Headers.Should().NotContainKey(HeaderNames.ETag); + + response.Result.ShouldNotBeNull(); } [Fact] From f8e8912ebcad6d6bf1faf7d766de68949a282dfd Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 22 Feb 2024 20:09:09 -0500 Subject: [PATCH 32/36] Address PR comments --- .../JsonApiDotNetCoreExample.json | 60 ++++++++++----- .../JsonApiOperationDocumentationFilter.cs | 9 ++- .../LegacyClient/swagger.g.json | 74 +++++++++++------- .../CamelCase/swagger.g.json | 34 ++++++--- .../KebabCase/swagger.g.json | 34 ++++++--- .../PascalCase/swagger.g.json | 34 ++++++--- .../ModelStateValidationOff/swagger.g.json | 32 +++++--- .../ModelStateValidationOn/swagger.g.json | 32 +++++--- .../ModelStateValidationOff/swagger.g.json | 44 +++++++---- .../ModelStateValidationOn/swagger.g.json | 44 +++++++---- .../OpenApiEndToEndTests/Headers/ETagTests.cs | 11 +-- .../Headers/swagger.g.json | 14 ++-- .../QueryStrings/swagger.g.json | 40 ++++++---- .../DocComments/DocCommentsTests.cs | 14 +++- test/OpenApiTests/Headers/HeaderFakers.cs | 15 +++- test/OpenApiTests/Headers/HeaderTests.cs | 2 +- .../LegacyOpenApiIntegration/swagger.json | 76 ++++++++++++------- 17 files changed, 375 insertions(+), 194 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 77866e2821..0a76c10052 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The person was successfully created, which resulted in additional changes. The newly created person is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created person can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1253,7 +1257,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1419,7 +1424,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1772,7 +1778,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1834,7 +1841,7 @@ "description": "The tag was successfully created, which resulted in additional changes. The newly created tag is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created tag can be retrieved.", "required": true, "schema": { "type": "string", @@ -2043,7 +2050,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2349,7 +2357,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2515,7 +2524,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2868,7 +2878,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2930,7 +2941,7 @@ "description": "The todoItem was successfully created, which resulted in additional changes. The newly created todoItem is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created todoItem can be retrieved.", "required": true, "schema": { "type": "string", @@ -3139,7 +3150,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3445,7 +3457,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3611,7 +3624,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -3858,7 +3872,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4024,7 +4039,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -4271,7 +4287,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4437,7 +4454,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs index ef22016b44..9539e9c666 100644 --- a/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs +++ b/src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs @@ -227,7 +227,7 @@ private void ApplyPostResource(OpenApiOperation operation, ResourceType resource SetResponseDescription(operation.Responses, HttpStatusCode.Created, $"The {singularName} was successfully created, which resulted in additional changes. The newly created {singularName} is returned."); - SetResponseHeaderLocation(operation.Responses, HttpStatusCode.Created); + SetResponseHeaderLocation(operation.Responses, HttpStatusCode.Created, singularName); SetResponseDescription(operation.Responses, HttpStatusCode.NoContent, $"The {singularName} was successfully created, which did not result in additional changes."); @@ -489,18 +489,19 @@ private static void SetResponseHeaderContentLength(OpenApiResponses responses, H Required = true, Schema = new OpenApiSchema { - Type = "integer" + Type = "integer", + Format = "int64" } }; } - private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode) + private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpStatusCode statusCode, string resourceName) { OpenApiResponse response = GetOrAddResponse(responses, statusCode); response.Headers[HeaderNames.Location] = new OpenApiHeader { - Description = "The URL at which the newly created JSON:API resource can be retrieved.", + Description = $"The URL at which the newly created {resourceName} can be retrieved.", Required = true, Schema = new OpenApiSchema { diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index b51fdafcc0..cb248c3e18 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created airplane can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1225,7 +1229,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1287,7 +1292,7 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created flight-attendant can be retrieved.", "required": true, "schema": { "type": "string", @@ -1496,7 +1501,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1802,7 +1808,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1968,7 +1975,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2349,7 +2357,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2515,7 +2524,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2868,7 +2878,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2930,7 +2941,7 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created flight can be retrieved.", "required": true, "schema": { "type": "string", @@ -3139,7 +3150,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3445,7 +3457,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3611,7 +3624,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -3858,7 +3872,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4024,7 +4039,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -4405,7 +4421,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4571,7 +4588,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -4952,7 +4970,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -5118,7 +5137,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -5337,7 +5357,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -5399,7 +5420,7 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created passenger can be retrieved.", "required": true, "schema": { "type": "string", @@ -5608,7 +5629,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 0129f17ba0..627099d52f 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The staffMember was successfully created, which resulted in additional changes. The newly created staffMember is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created staffMember can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -678,7 +680,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -740,7 +743,7 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created supermarket can be retrieved.", "required": true, "schema": { "type": "string", @@ -949,7 +952,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1255,7 +1259,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1421,7 +1426,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1668,7 +1674,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1834,7 +1841,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2215,7 +2223,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2381,7 +2390,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 80114c8018..2958f364e6 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The staff-member was successfully created, which resulted in additional changes. The newly created staff-member is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created staff-member can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -678,7 +680,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -740,7 +743,7 @@ "description": "The supermarket was successfully created, which resulted in additional changes. The newly created supermarket is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created supermarket can be retrieved.", "required": true, "schema": { "type": "string", @@ -949,7 +952,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1255,7 +1259,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1421,7 +1426,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1668,7 +1674,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1834,7 +1841,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2215,7 +2223,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2381,7 +2390,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index db357bcf7b..072b70fcd0 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The StaffMember was successfully created, which resulted in additional changes. The newly created StaffMember is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created StaffMember can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -678,7 +680,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -740,7 +743,7 @@ "description": "The Supermarket was successfully created, which resulted in additional changes. The newly created Supermarket is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created Supermarket can be retrieved.", "required": true, "schema": { "type": "string", @@ -949,7 +952,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1255,7 +1259,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1421,7 +1426,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1668,7 +1674,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1834,7 +1841,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2215,7 +2223,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2381,7 +2390,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index dcca648082..c7f3451ed7 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created resource can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1253,7 +1257,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1419,7 +1424,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1666,7 +1672,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1832,7 +1839,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2213,7 +2221,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2379,7 +2388,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index a34c8968fb..0cafc0840e 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created resource can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1253,7 +1257,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1419,7 +1424,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1666,7 +1672,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1832,7 +1839,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2213,7 +2221,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2379,7 +2388,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index d61d9c0062..08426843fe 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created resource can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1119,7 +1123,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1285,7 +1290,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1532,7 +1538,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1698,7 +1705,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1945,7 +1953,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2111,7 +2120,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2358,7 +2368,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2524,7 +2535,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2905,7 +2917,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3071,7 +3084,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index 7f5ab3ba18..d9f60f987f 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The resource was successfully created, which resulted in additional changes. The newly created resource is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created resource can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1119,7 +1123,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1285,7 +1290,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1532,7 +1538,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1698,7 +1705,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1945,7 +1953,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2111,7 +2120,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2358,7 +2368,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2524,7 +2535,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2905,7 +2917,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3071,7 +3084,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 856d2f3f41..dfe3fa2cdf 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -83,11 +83,11 @@ public async Task Returns_no_ETag_for_failed_GET_request() var apiClient = new HeadersClient(httpClient); // Act - Func>> act = () => + Func>> action = () => ApiResponse.TranslateAsync(() => apiClient.GetCountryAsync(Unknown.StringId.For(), null, null)); // Assert - ApiException exception = (await act.Should().ThrowExactlyAsync>()).Which; + ApiException exception = (await action.Should().ThrowExactlyAsync>()).Which; exception.StatusCode.Should().Be((int)HttpStatusCode.NotFound); exception.Headers.Should().NotContainKey(HeaderNames.ETag); } @@ -96,6 +96,7 @@ public async Task Returns_no_ETag_for_failed_GET_request() public async Task Returns_no_ETag_for_POST_request() { // Arrange + Country country = _fakers.Country.Generate(); using HttpClient httpClient = _testContext.Factory.CreateClient(); var apiClient = new HeadersClient(httpClient); @@ -107,8 +108,8 @@ public async Task Returns_no_ETag_for_POST_request() { Attributes = new CountryAttributesInPostRequest { - Name = _fakers.Country.Generate().Name, - Population = _fakers.Country.Generate().Population + Name = country.Name, + Population = country.Population } } })); @@ -139,7 +140,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => ApiResponse response1 = await ApiResponse.TranslateAsync(() => apiClient.GetCountryCollectionAsync(null, null)); - string responseETag = response1.Headers[HeaderNames.ETag].First(); + string responseETag = response1.Headers[HeaderNames.ETag].Single(); // Act ApiResponse response2 = diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index fd8cea53e5..4ec1eb384b 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The country was successfully created, which resulted in additional changes. The newly created country is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created country can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index ddedb8303d..4bc50c0e49 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The nameValuePair was successfully created, which resulted in additional changes. The newly created nameValuePair is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created nameValuePair can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1091,7 +1095,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1153,7 +1158,7 @@ "description": "The node was successfully created, which resulted in additional changes. The newly created node is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created node can be retrieved.", "required": true, "schema": { "type": "string", @@ -1362,7 +1367,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1668,7 +1674,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1834,7 +1841,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2215,7 +2223,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2381,7 +2390,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2628,7 +2638,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2794,7 +2805,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { diff --git a/test/OpenApiTests/DocComments/DocCommentsTests.cs b/test/OpenApiTests/DocComments/DocCommentsTests.cs index a6db61ac91..768a53decc 100644 --- a/test/OpenApiTests/DocComments/DocCommentsTests.cs +++ b/test/OpenApiTests/DocComments/DocCommentsTests.cs @@ -81,6 +81,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscrapers, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -107,6 +108,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); }); }); @@ -126,7 +128,7 @@ public async Task Endpoints_are_documented() { responsesElement.EnumerateObject().ShouldHaveCount(5); responsesElement.Should().HaveProperty("201.description", "The skyscraper was successfully created, which resulted in additional changes. The newly created skyscraper is returned."); - responsesElement.Should().HaveProperty("201.headers.Location.description", "The URL at which the newly created JSON:API resource can be retrieved."); + responsesElement.Should().HaveProperty("201.headers.Location.description", "The URL at which the newly created skyscraper can be retrieved."); responsesElement.Should().HaveProperty("204.description", "The skyscraper was successfully created, which did not result in additional changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid or the request body is missing or malformed."); responsesElement.Should().HaveProperty("409.description", "A resource type in the request body is incompatible."); @@ -159,6 +161,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found skyscraper."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -188,6 +191,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -264,6 +268,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -293,6 +298,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -323,6 +329,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found elevator identity, or `null` if it was not found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -352,6 +359,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -405,6 +413,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found spaces, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -434,6 +443,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -464,6 +474,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.description", "Successfully returns the found space identities, or an empty array if none were found."); responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); @@ -493,6 +504,7 @@ public async Task Endpoints_are_documented() responsesElement.Should().HaveProperty("200.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("200.headers.Content-Length.description", "Size of the HTTP response body, in bytes."); responsesElement.Should().HaveProperty("304.description", "The fingerprint of the HTTP response matches one of the ETags from the incoming If-None-Match header."); + responsesElement.Should().HaveProperty("304.headers.ETag.description", "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes."); responsesElement.Should().HaveProperty("400.description", "The query string is invalid."); responsesElement.Should().HaveProperty("404.description", "The skyscraper does not exist."); }); diff --git a/test/OpenApiTests/Headers/HeaderFakers.cs b/test/OpenApiTests/Headers/HeaderFakers.cs index 0be7769064..b00f7a1505 100644 --- a/test/OpenApiTests/Headers/HeaderFakers.cs +++ b/test/OpenApiTests/Headers/HeaderFakers.cs @@ -1,3 +1,4 @@ +using System.Globalization; using Bogus; using JetBrains.Annotations; using TestBuildingBlocks; @@ -10,6 +11,16 @@ namespace OpenApiTests.Headers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] public sealed class HeaderFakers : FakerContainer { + private static readonly Lazy LazyLanguageNames = new(() => CultureInfo + .GetCultures(CultureTypes.NeutralCultures) + .Select(culture => culture.DisplayName) + .ToArray()); + + private static readonly Lazy LazyLanguageCodes = new(() => CultureInfo + .GetCultures(CultureTypes.NeutralCultures) + .Select(culture => culture.ThreeLetterISOLanguageName) + .ToArray()); + private readonly Lazy> _lazyCountryFaker = new(() => new Faker() .UseSeed(GetFakerSeed()) .RuleFor(country => country.Name, faker => faker.Address.Country()) @@ -17,8 +28,8 @@ public sealed class HeaderFakers : FakerContainer private readonly Lazy> _lazyLanguageFaker = new(() => new Faker() .UseSeed(GetFakerSeed()) - .RuleFor(country => country.Name, faker => faker.Random.Word()) - .RuleFor(country => country.Code, faker => faker.Random.String(3))); + .RuleFor(textLanguage => textLanguage.Name, faker => faker.PickRandom(LazyLanguageNames.Value)) + .RuleFor(textLanguage => textLanguage.Code, faker => faker.PickRandom(LazyLanguageCodes.Value))); public Faker Country => _lazyCountryFaker.Value; public Faker Language => _lazyLanguageFaker.Value; diff --git a/test/OpenApiTests/Headers/HeaderTests.cs b/test/OpenApiTests/Headers/HeaderTests.cs index f8788fc327..99b8738a05 100644 --- a/test/OpenApiTests/Headers/HeaderTests.cs +++ b/test/OpenApiTests/Headers/HeaderTests.cs @@ -131,7 +131,7 @@ public async Task Post_resource_endpoint_has_location_response_header() // Assert document.Should().ContainPath("paths./countries.post.responses.201.headers.Location").With(locationElement => { - locationElement.Should().HaveProperty("description", "The URL at which the newly created JSON:API resource can be retrieved."); + locationElement.Should().HaveProperty("description", "The URL at which the newly created country can be retrieved."); locationElement.Should().HaveProperty("required", true); diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index 1615bfae56..cb248c3e18 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -129,7 +129,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -191,7 +192,7 @@ "description": "The airplane was successfully created, which resulted in additional changes. The newly created airplane is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created airplane can be retrieved.", "required": true, "schema": { "type": "string", @@ -400,7 +401,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -706,7 +708,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -872,7 +875,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -1225,7 +1229,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1287,7 +1292,7 @@ "description": "The flight-attendant was successfully created, which resulted in additional changes. The newly created flight-attendant is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created flight-attendant can be retrieved.", "required": true, "schema": { "type": "string", @@ -1496,7 +1501,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1802,7 +1808,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -1968,7 +1975,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2349,7 +2357,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2515,7 +2524,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -2868,7 +2878,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -2930,7 +2941,7 @@ "description": "The flight was successfully created, which resulted in additional changes. The newly created flight is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created flight can be retrieved.", "required": true, "schema": { "type": "string", @@ -3139,7 +3150,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3445,7 +3457,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -3611,7 +3624,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -3858,7 +3872,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4024,7 +4039,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -4405,7 +4421,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -4571,7 +4588,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -4952,7 +4970,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -5118,7 +5137,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } }, "ETag": { @@ -5337,7 +5357,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -5399,7 +5420,7 @@ "description": "The passenger was successfully created, which resulted in additional changes. The newly created passenger is returned.", "headers": { "Location": { - "description": "The URL at which the newly created JSON:API resource can be retrieved.", + "description": "The URL at which the newly created passenger can be retrieved.", "required": true, "schema": { "type": "string", @@ -5608,7 +5629,8 @@ "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "integer" + "type": "integer", + "format": "int64" } } } @@ -6251,7 +6273,7 @@ }, "meta": { "type": "object", - "additionalProperties": {}, + "additionalProperties": { }, "nullable": true } }, From c22b8d1ff54aadbac844feec382d6076a2a02a1f Mon Sep 17 00:00:00 2001 From: verdie-g Date: Thu, 22 Feb 2024 20:27:05 -0500 Subject: [PATCH 33/36] Fix stuff --- .../JsonApiDotNetCoreExample.json | 84 ++++++++-------- .../LegacyClient/swagger.g.json | 98 +++++++++---------- .../CamelCase/swagger.g.json | 42 ++++---- .../KebabCase/swagger.g.json | 42 ++++---- .../PascalCase/swagger.g.json | 42 ++++---- .../ModelStateValidationOff/swagger.g.json | 56 +++++------ .../ModelStateValidationOn/swagger.g.json | 56 +++++------ .../ModelStateValidationOff/swagger.g.json | 84 ++++++++-------- .../ModelStateValidationOn/swagger.g.json | 84 ++++++++-------- .../Headers/swagger.g.json | 14 +-- .../QueryStrings/swagger.g.json | 56 +++++------ .../LegacyOpenApiIntegration/swagger.json | 98 +++++++++---------- 12 files changed, 378 insertions(+), 378 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json index 0a76c10052..36dfff6ef6 100644 --- a/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json +++ b/src/Examples/JsonApiDotNetCoreExample/GeneratedSwagger/JsonApiDotNetCoreExample.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1420,19 +1420,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2520,19 +2520,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -3620,19 +3620,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4035,19 +4035,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4450,19 +4450,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/LegacyClient/swagger.g.json b/test/OpenApiClientTests/LegacyClient/swagger.g.json index cb248c3e18..fac1314112 100644 --- a/test/OpenApiClientTests/LegacyClient/swagger.g.json +++ b/test/OpenApiClientTests/LegacyClient/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1971,19 +1971,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2520,19 +2520,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -3620,19 +3620,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4035,19 +4035,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4584,19 +4584,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -5133,19 +5133,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json index 627099d52f..545231baa0 100644 --- a/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/CamelCase/swagger.g.json @@ -1422,19 +1422,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1837,19 +1837,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2386,19 +2386,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json index 2958f364e6..22e59e773f 100644 --- a/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/KebabCase/swagger.g.json @@ -1422,19 +1422,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1837,19 +1837,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2386,19 +2386,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json index 072b70fcd0..384bb5017f 100644 --- a/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json +++ b/test/OpenApiClientTests/NamingConventions/PascalCase/swagger.g.json @@ -1422,19 +1422,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1837,19 +1837,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2386,19 +2386,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json index c7f3451ed7..a2d386cefd 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOff/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1420,19 +1420,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1835,19 +1835,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2384,19 +2384,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json index 0cafc0840e..7afb42a553 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOff/ModelStateValidationOn/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1420,19 +1420,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1835,19 +1835,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2384,19 +2384,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json index 08426843fe..02ccee3eb3 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOff/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1286,19 +1286,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1701,19 +1701,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2116,19 +2116,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2531,19 +2531,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -3080,19 +3080,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json index d9f60f987f..6cda95634b 100644 --- a/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json +++ b/test/OpenApiClientTests/ResourceFieldValidation/NullableReferenceTypesOn/ModelStateValidationOn/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1286,19 +1286,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1701,19 +1701,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2116,19 +2116,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2531,19 +2531,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -3080,19 +3080,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiEndToEndTests/Headers/swagger.g.json b/test/OpenApiEndToEndTests/Headers/swagger.g.json index 4ec1eb384b..2e56437cb0 100644 --- a/test/OpenApiEndToEndTests/Headers/swagger.g.json +++ b/test/OpenApiEndToEndTests/Headers/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json index 4bc50c0e49..3b04c1abc9 100644 --- a/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json +++ b/test/OpenApiEndToEndTests/QueryStrings/swagger.g.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1837,19 +1837,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2386,19 +2386,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2801,19 +2801,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } diff --git a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json index cb248c3e18..fac1314112 100644 --- a/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json +++ b/test/OpenApiTests/LegacyOpenApiIntegration/swagger.json @@ -871,19 +871,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -1971,19 +1971,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -2520,19 +2520,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -3620,19 +3620,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4035,19 +4035,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -4584,19 +4584,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } @@ -5133,19 +5133,19 @@ "200": { "description": "The operation completed successfully.", "headers": { - "Content-Length": { - "description": "Size of the HTTP response body, in bytes.", + "ETag": { + "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, - "ETag": { - "description": "A fingerprint of the HTTP response, which can be used in an If-None-Match header to only fetch changes.", + "Content-Length": { + "description": "Size of the HTTP response body, in bytes.", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } } } From 22fa0011b9179005513b5e22ef3559720f6f61e1 Mon Sep 17 00:00:00 2001 From: Bart Koelman <10324372+bkoelman@users.noreply.github.com> Date: Fri, 23 Feb 2024 03:17:10 +0100 Subject: [PATCH 34/36] Suggestion to update OpenAPI docs for headers usage --- docs/usage/openapi-client.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/usage/openapi-client.md b/docs/usage/openapi-client.md index 3f0b93f52e..2acd8f2fe6 100644 --- a/docs/usage/openapi-client.md +++ b/docs/usage/openapi-client.md @@ -39,7 +39,7 @@ The next steps describe how to generate a JSON:API client library and use our pa 5. Add the next line inside the **OpenApiReference** section in your project file: ```xml - /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client.Exceptions + /GenerateExceptionClasses:false /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client ``` 6. Add the following glue code to connect our package with your generated code. @@ -77,7 +77,7 @@ The next steps describe how to generate a JSON:API client library and use our pa ["filter"] = "has(assignedTodoItems)", ["sort"] = "-lastName", ["page[size]"] = "5" - }); + }, null); foreach (var person in getResponse.Data) { @@ -166,3 +166,34 @@ For example, the next section puts the generated code in a namespace and generat /GenerateClientInterfaces:true ``` + +## Headers and caching + +To use [ETags for caching](~/usage/caching.md), NSwag needs extra settings to make response headers accessible. +Specify the following in the `` element of your project file: + +``` +/GenerateExceptionClasses:false /WrapResponses:true /GenerateResponseClasses:false /ResponseClass:ApiResponse /AdditionalNamespaceUsages:JsonApiDotNetCore.OpenApi.Client +``` + +This enables the following code, which is explained below: + +```c# +var getResponse = await ApiResponse.TranslateAsync(() => apiClient.GetPersonCollectionAsync(null, null)); +string eTag = getResponse.Headers[HeaderNames.ETag].Single(); +Console.WriteLine($"Retrieved {getResponse.Result.Data.Count} people."); + +// wait some time... + +getResponse = await ApiResponse.TranslateAsync(() => apiClient.GetPersonCollectionAsync(null, eTag)); + +if (getResponse is { StatusCode: (int)HttpStatusCode.NotModified, Result: null }) +{ + Console.WriteLine("The HTTP response hasn't changed, so no response body was returned."); +} +``` + +The response of the first API call contains both data and an ETag header, which is a fingerprint of the response. +That ETag gets passed to the second API call. This enables the server to detect if something changed, which optimizes +network usage: no data is sent back, unless is has changed. +If you only want to ask whether data has changed without fetching it, use a HEAD request instead. From 0eae574df385fcf74cd8b1a3b4709262f80e697f Mon Sep 17 00:00:00 2001 From: verdie-g Date: Fri, 23 Feb 2024 14:35:44 -0500 Subject: [PATCH 35/36] Address PR comments --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 7 +++---- test/OpenApiTests/Headers/HeaderFakers.cs | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index dfe3fa2cdf..7ab11e88a7 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -44,7 +44,6 @@ await _testContext.RunOnDatabaseAsync(async dbContext => // Assert response.StatusCode.Should().Be((int)HttpStatusCode.OK); - response.Headers.Should().ContainKey(HeaderNames.ETag); response.Headers.Should().ContainKey(HeaderNames.ETag).WhoseValue.Should().NotBeNullOrEmpty(); } @@ -96,7 +95,7 @@ public async Task Returns_no_ETag_for_failed_GET_request() public async Task Returns_no_ETag_for_POST_request() { // Arrange - Country country = _fakers.Country.Generate(); + Country newCountry = _fakers.Country.Generate(); using HttpClient httpClient = _testContext.Factory.CreateClient(); var apiClient = new HeadersClient(httpClient); @@ -108,8 +107,8 @@ public async Task Returns_no_ETag_for_POST_request() { Attributes = new CountryAttributesInPostRequest { - Name = country.Name, - Population = country.Population + Name = newCountry.Name, + Population = newCountry.Population } } })); diff --git a/test/OpenApiTests/Headers/HeaderFakers.cs b/test/OpenApiTests/Headers/HeaderFakers.cs index b00f7a1505..b22a0b0cd3 100644 --- a/test/OpenApiTests/Headers/HeaderFakers.cs +++ b/test/OpenApiTests/Headers/HeaderFakers.cs @@ -28,8 +28,8 @@ public sealed class HeaderFakers : FakerContainer private readonly Lazy> _lazyLanguageFaker = new(() => new Faker() .UseSeed(GetFakerSeed()) - .RuleFor(textLanguage => textLanguage.Name, faker => faker.PickRandom(LazyLanguageNames.Value)) - .RuleFor(textLanguage => textLanguage.Code, faker => faker.PickRandom(LazyLanguageCodes.Value))); + .RuleFor(language => language.Name, faker => faker.PickRandom(LazyLanguageNames.Value)) + .RuleFor(language => language.Code, faker => faker.PickRandom(LazyLanguageCodes.Value))); public Faker Country => _lazyCountryFaker.Value; public Faker Language => _lazyLanguageFaker.Value; From a9f15f5b2ca96e8e9225ce5a2c07c309760be5a5 Mon Sep 17 00:00:00 2001 From: Bart Koelman <10324372+bkoelman@users.noreply.github.com> Date: Fri, 23 Feb 2024 21:48:16 +0100 Subject: [PATCH 36/36] Add missing line break --- test/OpenApiEndToEndTests/Headers/ETagTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/OpenApiEndToEndTests/Headers/ETagTests.cs b/test/OpenApiEndToEndTests/Headers/ETagTests.cs index 7ab11e88a7..97a4dd9467 100644 --- a/test/OpenApiEndToEndTests/Headers/ETagTests.cs +++ b/test/OpenApiEndToEndTests/Headers/ETagTests.cs @@ -96,6 +96,7 @@ public async Task Returns_no_ETag_for_POST_request() { // Arrange Country newCountry = _fakers.Country.Generate(); + using HttpClient httpClient = _testContext.Factory.CreateClient(); var apiClient = new HeadersClient(httpClient);