fix: Return 204 No Content without Content-Type for PUT
This commit is contained in:
committed by
Wolfgang Walther
parent
1cb00d3c62
commit
0e20b47875
@@ -22,8 +22,13 @@ spec :: PgVersion -> SpecWith ((), Application)
|
||||
spec actualPgVersion = describe "OpenAPI" $ 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"]
|
||||
}
|
||||
|
||||
it "should respond to openapi request on none root path with 415" $
|
||||
request methodGet "/items"
|
||||
|
||||
Reference in New Issue
Block a user