Skip to content

Commit 8d7f5c7

Browse files
committed
Make response headers required
1 parent d58ddaa commit 8d7f5c7

File tree

2 files changed

+54
-4
lines changed

2 files changed

+54
-4
lines changed

src/JsonApiDotNetCore.OpenApi/SwaggerComponents/JsonApiOperationDocumentationFilter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ private static void SetResponseHeaderETag(OpenApiResponses responses, HttpStatus
441441
response.Headers[HeaderNames.ETag] = new OpenApiHeader
442442
{
443443
Description = "ETag identifying the version of the fetched resource.",
444+
Required = true,
444445
Example = new OpenApiString("\"33a64df551425fcc55e4d42a148795d9f25f89d4\""),
445446
};
446447
}
@@ -451,6 +452,7 @@ private static void SetResponseHeaderLocation(OpenApiResponses responses, HttpSt
451452
response.Headers[HeaderNames.Location] = new OpenApiHeader
452453
{
453454
Description = "Location of the newly created resource.",
455+
Required = true,
454456
};
455457
}
456458

0 commit comments

Comments
 (0)