@@ -120,7 +120,7 @@ applyTagsFor ops ts swag = swag
120120-- necessary schema definitions.
121121--
122122-- >>> encode $ runDeclare (declareResponse (Proxy :: Proxy Day)) mempty
123−-- "[{\"Day\":{\"format\":\"date\",\"type\":\"string\"}},{\"description\":\"\",\"schema\":{\"$ref\":\"#/definitions/Day\"}}]"
123+-- "[{\"Day\":{\"example\":\"2016-07-22\",\"format\":\"date\",\"type\":\"string\"}},{\"description\":\"\",\"schema\":{\"$ref\":\"#/definitions/Day\"}}]"
124124declareResponse :: ToSchema a => proxy a -> Declare (Definitions Schema) Response
125125declareResponse proxy = do
126126 s <- declareSchemaRef proxy
@@ -140,7 +140,7 @@ declareResponse proxy = do
140140-- >>> let api = (mempty :: Swagger) & paths .~ [("/user", mempty & get ?~ mempty)]
141141-- >>> let res = declareResponse (Proxy :: Proxy Day)
142142-- >>> encode $ api & setResponse 200 res
143−-- "{\"swagger\":\"2.0\",\"info\":{\"version\":\"\",\"title\":\"\"},\"paths\":{\"/user\":{\"get\":{\"responses\":{\"200\":{\"schema\":{\"$ref\":\"#/definitions/Day\"},\"description\":\"\"}}}}},\"definitions\":{\"Day\":{\"format\":\"date\",\"type\":\"string\"}}}"
143+-- "{\"swagger\":\"2.0\",\"info\":{\"version\":\"\",\"title\":\"\"},\"paths\":{\"/user\":{\"get\":{\"responses\":{\"200\":{\"schema\":{\"$ref\":\"#/definitions/Day\"},\"description\":\"\"}}}}},\"definitions\":{\"Day\":{\"example\":\"2016-07-22\",\"format\":\"date\",\"type\":\"string\"}}}"
144144--
145145-- See also @'setResponseWith'@.
146146setResponse :: HttpStatusCode -> Declare (Definitions Schema) Response -> Swagger -> Swagger