@@ -50,6 +50,7 @@ spec = do
50 context "Model with Example" $ schemaWithExampleExample <~> schemaWithExampleExampleJSON
50 context "Model with Example" $ schemaWithExampleExample <~> schemaWithExampleExampleJSON
51 describe "Definitions Object" $ definitionsExample <~> definitionsExampleJSON
51 describe "Definitions Object" $ definitionsExample <~> definitionsExampleJSON
52 describe "Parameters Definition Object" $ parametersDefinitionExample <~> parametersDefinitionExampleJSON
52 describe "Parameters Definition Object" $ parametersDefinitionExample <~> parametersDefinitionExampleJSON
53+ describe "Responses Definition Object" $ responsesDefinitionExample <~> responsesDefinitionExampleJSON
54main :: IO ()
55main :: IO ()
55main = hspec spec
56main = hspec spec
@@ -436,3 +437,24 @@ parametersDefinitionExampleJSON = [aesonQQ|
441+-- =======================================================================
442+-- Responses Definition object
443+-- =======================================================================
445+responsesDefinitionExample :: HashMap Text SwaggerResponse
446+responsesDefinitionExample =
447+ [ ("NotFound", mempty { swaggerResponseDescription = "Entity not found." })
448+ , ("IllegalInput", mempty { swaggerResponseDescription = "Illegal input for operation." }) ]
450+responsesDefinitionExampleJSON :: Value
451+responsesDefinitionExampleJSON = [aesonQQ|
454+ "description": "Entity not found."
457+ "description": "Illegal input for operation."