diff --git a/src/Deriving/OpenApi.hs b/src/Deriving/OpenApi.hs index b81e169..c75645d 100644 --- a/src/Deriving/OpenApi.hs +++ b/src/Deriving/OpenApi.hs @@ -17,6 +17,7 @@ import Data.OpenApi.Internal.Schema import Data.Proxy import Data.Text (Text) import qualified Data.Text as T +import Data.Typeable import Deriving.Aeson import GHC.Generics import GHC.TypeLits @@ -24,7 +25,7 @@ import Servant.API type CustomOpenApi = CustomJSON -instance (OpenApiOptions xs, GToSchema (Rep x), Generic x) => ToSchema (CustomJSON xs x) where +instance (OpenApiOptions xs, GToSchema (Rep x), Generic x, Typeable x, Typeable xs) => ToSchema (CustomJSON xs x) where declareNamedSchema Proxy = openApiSchemaModifier @xs <$> genericDeclareNamedSchema (openApiOptions @xs) (Proxy @x) @@ -79,7 +80,7 @@ instance (StringModifier f, OpenApiOptions xs) => OpenApiOptions (ConstructorTag openApiOptions = (openApiOptions @xs) {constructorTagModifier = getStringModifier @f} instance - (OpenApiOptions xs, TypeError ( 'Text "openapi3-deriving does not currently the `TagSingleConstructors` modifier.")) => + (OpenApiOptions xs, TypeError ('Text "openapi3-deriving does not currently the `TagSingleConstructors` modifier.")) => OpenApiOptions (TagSingleConstructors ': xs) where openApiOptions = undefined diff --git a/stack.yaml b/stack.yaml index 8d5a90b..b052106 100644 --- a/stack.yaml +++ b/stack.yaml @@ -4,4 +4,4 @@ packages: - . extra-deps: - - openapi3-3.0.0.1@sha256:205669d14c5b48d2275e0bac41d78c9bfdb925ef9a8e3265662ce51a9e6d8139,4641 + - openapi3-3.1.0