Idiots, idiots everywhere

This commit is contained in:
Łukasz Domeradzki
2025-12-27 05:58:55 +01:00
parent ec3b6ac0fd
commit c89cdbdad9

View File

@@ -111,9 +111,10 @@ internal sealed class DocumentTransformer : IOpenApiDocumentTransformer {
document.Paths.Add( document.Paths.Add(
$"/{nlogEndpont.RelativePath}", new OpenApiPathItem { $"/{nlogEndpont.RelativePath}", new OpenApiPathItem {
Operations = new Dictionary<HttpMethod, OpenApiOperation>(2) { Operations = new Dictionary<HttpMethod, OpenApiOperation>(2) {
// HTTP/2 use CONNECT for that endpoint
{ HttpMethod.Connect, operation }, { HttpMethod.Connect, operation },
// This is in fact incorrect, however, swagger ui does not display connect-only methods, so we'll add fake GET as well // But HTTP/1.1 use GET with upgrade, so this is also valid
{ HttpMethod.Get, operation } { HttpMethod.Get, operation }
} }
} }