@@ -34,18 +34,17 @@ class GToSchema (f :: * -> *) where
35instance {-# OVERLAPPABLE #-} ToSchema a => ToSchema [a] where
35instance {-# OVERLAPPABLE #-} ToSchema a => ToSchema [a] where
36 toSchema _ = mempty
36 toSchema _ = mempty
37− { _schemaType = SchemaArray
37+ & schemaType .~ SchemaArray
38− , _schemaItems = Just (SchemaItemsObject (Inline (toSchema (Proxy :: Proxy a))))
38+ & schemaItems ?~ SchemaItemsObject (Inline (toSchema (Proxy :: Proxy a)))
41instance {-# OVERLAPPING #-} ToSchema String where
40instance {-# OVERLAPPING #-} ToSchema String where
42− toSchema _ = mempty { _schemaType = SchemaString }
41+ toSchema _ = mempty & schemaType .~ SchemaString
44instance ToSchema Bool where
43instance ToSchema Bool where
45− toSchema _ = mempty { _schemaType = SchemaBoolean }
44+ toSchema _ = mempty & schemaType .~ SchemaBoolean
47instance ToSchema Integer where
46instance ToSchema Integer where
48− toSchema _ = mempty { _schemaType = SchemaInteger }
47+ toSchema _ = mempty & schemaType .~ SchemaInteger
50instance ToSchema Int where toSchema = toSchemaBoundedIntegral
49instance ToSchema Int where toSchema = toSchemaBoundedIntegral
51instance ToSchema Int8 where toSchema = toSchemaBoundedIntegral
50instance ToSchema Int8 where toSchema = toSchemaBoundedIntegral
@@ -60,10 +59,10 @@ instance ToSchema Word32 where toSchema = toSchemaBoundedIntegral
60instance ToSchema Word64 where toSchema = toSchemaBoundedIntegral
59instance ToSchema Word64 where toSchema = toSchemaBoundedIntegral
62instance ToSchema Double where
61instance ToSchema Double where
63− toSchema _ = mempty { _schemaType = SchemaNumber }
62+ toSchema _ = mempty & schemaType .~ SchemaNumber
65instance ToSchema Float where
64instance ToSchema Float where
66− toSchema _ = mempty { _schemaType = SchemaNumber }
65+ toSchema _ = mempty & schemaType .~ SchemaNumber
68instance ToSchema a => ToSchema (Maybe a) where
67instance ToSchema a => ToSchema (Maybe a) where
69 toSchema _ = toSchema (Proxy :: Proxy a)
68 toSchema _ = toSchema (Proxy :: Proxy a)