git.iko.soy/typeable/openapi3
on master help sign in
Fix doctest for GHC 7.8
14bd0e8Nickolay Kudasov
src/Data/Swagger/Schema/Validation.hs+1−6
@@ -52,12 +52,7 @@ import Data.Swagger.Internal.Schema.Validation
52--
52--
53-- >>> newtype Nat = Nat Integer deriving Generic
53-- >>> newtype Nat = Nat Integer deriving Generic
54-- >>> instance ToJSON Nat where toJSON (Nat n) = toJSON n
54-- >>> instance ToJSON Nat where toJSON (Nat n) = toJSON n
55−-- >>> :{
55+-- >>> instance ToSchema Nat where declareNamedSchema proxy = genericDeclareNamedSchema defaultSchemaOptions proxy & mapped.minimum_ ?~ 0
56−-- instance ToSchema Nat where
57−-- declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy Integer)
58−-- & mapped.minimum_ ?~ 0
59−-- :}
60−--
61-- >>> validateToJSON (Nat 10)
56-- >>> validateToJSON (Nat 10)
62-- []
57-- []
63-- >>> validateToJSON (Nat (-5))
58-- >>> validateToJSON (Nat (-5))