git.iko.soy/deriving-openapi3
on master help sign in
Added typeable superclass
commitc0c7c3d30058cb1969dc4bc72bf1c4551843268a authoriko <ilyakooo0@gmail.com> dateSat 1 May 2021, 18:52 (5 years ago) parent29e7d7e
2 files changed+4−3
src/Deriving/OpenApi.hs+3−2 stack.yaml+1−1
src/Deriving/OpenApi.hs+3−2
@@ -17,6 +17,7 @@ import Data.OpenApi.Internal.Schema
1717import Data.Proxy
1818import Data.Text (Text)
1919import qualified Data.Text as T
20+import Data.Typeable
2021import Deriving.Aeson
2122import GHC.Generics
2223import GHC.TypeLits
@@ -24,7 +25,7 @@ import Servant.API
2425
2526type CustomOpenApi = CustomJSON
2627
27−instance (OpenApiOptions xs, GToSchema (Rep x), Generic x) => ToSchema (CustomJSON xs x) where
28+instance (OpenApiOptions xs, GToSchema (Rep x), Generic x, Typeable x, Typeable xs) => ToSchema (CustomJSON xs x) where
2829 declareNamedSchema Proxy =
2930 openApiSchemaModifier @xs <$> genericDeclareNamedSchema (openApiOptions @xs) (Proxy @x)
3031
@@ -79,7 +80,7 @@ instance (StringModifier f, OpenApiOptions xs) => OpenApiOptions (ConstructorTag
7980 openApiOptions = (openApiOptions @xs) {constructorTagModifier = getStringModifier @f}
8081
8182instance
82− (OpenApiOptions xs, TypeError ( 'Text "openapi3-deriving does not currently the `TagSingleConstructors` modifier.")) =>
83+ (OpenApiOptions xs, TypeError ('Text "openapi3-deriving does not currently the `TagSingleConstructors` modifier.")) =>
8384 OpenApiOptions (TagSingleConstructors ': xs)
8485 where
8586 openApiOptions = undefined
stack.yaml+1−1
@@ -4,4 +4,4 @@ packages:
44 - .
55
66extra-deps:
7− - openapi3-3.0.0.1@sha256:205669d14c5b48d2275e0bac41d78c9bfdb925ef9a8e3265662ce51a9e6d8139,4641
7+ - openapi3-3.1.0