git.iko.soy/typeable/openapi3
on master help sign in
Merge pull request #116 from mithrandi/identity-instances
9f92754Nickolay Kudasov
src/Data/Swagger/Internal/ParamSchema.hs+2
@@ -225,6 +225,8 @@ instance ToParamSchema a => ToParamSchema (First a) where toParamSchema _ = to
225instance ToParamSchema a => ToParamSchema (Last a) where toParamSchema _ = toParamSchema (Proxy :: Proxy a)
225instance ToParamSchema a => ToParamSchema (Last a) where toParamSchema _ = toParamSchema (Proxy :: Proxy a)
226instance ToParamSchema a => ToParamSchema (Dual a) where toParamSchema _ = toParamSchema (Proxy :: Proxy a)
226instance ToParamSchema a => ToParamSchema (Dual a) where toParamSchema _ = toParamSchema (Proxy :: Proxy a)
227
227
228+instance ToParamSchema a => ToParamSchema (Identity a) where toParamSchema _ = toParamSchema (Proxy :: Proxy a)
229+
228instance ToParamSchema a => ToParamSchema [a] where
230instance ToParamSchema a => ToParamSchema [a] where
229 toParamSchema _ = mempty
231 toParamSchema _ = mempty
230 & type_ .~ SwaggerArray
232 & type_ .~ SwaggerArray
src/Data/Swagger/Internal/Schema.hs+2
@@ -565,6 +565,8 @@ instance ToSchema a => ToSchema (First a) where declareNamedSchema _ = unname
565instance ToSchema a => ToSchema (Last a) where declareNamedSchema _ = unname <$> declareNamedSchema (Proxy :: Proxy a)
565instance ToSchema a => ToSchema (Last a) where declareNamedSchema _ = unname <$> declareNamedSchema (Proxy :: Proxy a)
566instance ToSchema a => ToSchema (Dual a) where declareNamedSchema _ = unname <$> declareNamedSchema (Proxy :: Proxy a)
566instance ToSchema a => ToSchema (Dual a) where declareNamedSchema _ = unname <$> declareNamedSchema (Proxy :: Proxy a)
567
567
568+instance ToSchema a => ToSchema (Identity a) where declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy a)
569+
568-- | Default schema for @'Bounded'@, @'Integral'@ types.
570-- | Default schema for @'Bounded'@, @'Integral'@ types.
569--
571--
570-- >>> encode $ toSchemaBoundedIntegral (Proxy :: Proxy Int16)
572-- >>> encode $ toSchemaBoundedIntegral (Proxy :: Proxy Int16)
stack.yaml+1−1
@@ -1,3 +1,3 @@
1−resolver: lts-8.0
1+resolver: lts-9.3
2packages:
2packages:
3- '.'
3- '.'