fix: Return 204 No Content without Content-Type for PUT

This commit is contained in:
Wolfgang Walther
2021-12-01 09:19:47 +01:00
committed by Wolfgang Walther
parent 1cb00d3c62
commit 0e20b47875
15 changed files with 373 additions and 193 deletions
+8 -2
View File
@@ -19,8 +19,14 @@ spec :: SpecWith ((), Application)
spec = describe "OpenAPI Ignore Privileges" $ do
it "root path returns a valid openapi spec" $ do
validateOpenApiResponse [("Accept", "application/openapi+json")]
request methodHead "/" (acceptHdrs "application/openapi+json") ""
`shouldRespondWith` "" { matchStatus = 200 }
request methodHead "/"
(acceptHdrs "application/openapi+json")
""
`shouldRespondWith`
""
{ matchStatus = 200
, matchHeaders = [ "Content-Type" <:> "application/openapi+json; charset=utf-8" ]
}
describe "table" $ do