@@ -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