@@ -50,6 +50,7 @@ spec = do
5050 context "Model with Example" $ schemaWithExampleExample <~> schemaWithExampleExampleJSON
5151 describe "Definitions Object" $ definitionsExample <~> definitionsExampleJSON
5252 describe "Parameters Definition Object" $ parametersDefinitionExample <~> parametersDefinitionExampleJSON
53+ describe "Responses Definition Object" $ responsesDefinitionExample <~> responsesDefinitionExampleJSON
5354
5455main :: IO ()
5556main = hspec spec
@@ -436,3 +437,24 @@ parametersDefinitionExampleJSON = [aesonQQ|
436437 }
437438}
438439|]
440+
441+-- =======================================================================
442+-- Responses Definition object
443+-- =======================================================================
444+
445+responsesDefinitionExample :: HashMap Text SwaggerResponse
446+responsesDefinitionExample =
447+ [ ("NotFound", mempty { swaggerResponseDescription = "Entity not found." })
448+ , ("IllegalInput", mempty { swaggerResponseDescription = "Illegal input for operation." }) ]
449+
450+responsesDefinitionExampleJSON :: Value
451+responsesDefinitionExampleJSON = [aesonQQ|
452+{
453+ "NotFound": {
454+ "description": "Entity not found."
455+ },
456+ "IllegalInput": {
457+ "description": "Illegal input for operation."
458+ }
459+}
460+|]