diff --git a/src/Tie/Codegen/Response.hs b/src/Tie/Codegen/Response.hs index 710212e..117db53 100644 --- a/src/Tie/Codegen/Response.hs +++ b/src/Tie/Codegen/Response.hs @@ -71,7 +71,7 @@ codegenToResponses operationName responses defaultResponse = | Just {} <- jsonResponseContent = "(" <> "Data.Aeson.fromEncoding" <+> "(" <> "Data.Aeson.toEncoding" <+> "x" <> ")" <> ")" | otherwise = - mempty + "mempty" responseHeaders Response {jsonResponseContent} | Just {} <- jsonResponseContent = diff --git a/test/golden/petstore.yaml.out b/test/golden/petstore.yaml.out index 5d91400..3e96b1f 100644 --- a/test/golden/petstore.yaml.out +++ b/test/golden/petstore.yaml.out @@ -160,7 +160,7 @@ data CreatePetsResponse instance ToResponse CreatePetsResponse where toResponse (CreatePetsResponse201 ) = - Network.Wai.responseBuilder (toEnum 201) [] + Network.Wai.responseBuilder (toEnum 201) [] mempty toResponse (CreatePetsDefaultResponse status x) = Network.Wai.responseBuilder status [(Network.HTTP.Types.hContentType, "application/json")] (Data.Aeson.fromEncoding (Data.Aeson.toEncoding x)) ---------------------