@@ -17,6 +17,7 @@ import Data.OpenApi.Internal.Schema
17import Data.Proxy
17import Data.Proxy
18import Data.Text (Text)
18import Data.Text (Text)
19import qualified Data.Text as T
19import qualified Data.Text as T
20import Deriving.Aeson
21import Deriving.Aeson
21import GHC.Generics
22import GHC.Generics
22import GHC.TypeLits
23import GHC.TypeLits
@@ -24,7 +25,7 @@ import Servant.API
25type CustomOpenApi = CustomJSON
26type CustomOpenApi = CustomJSON
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
28 declareNamedSchema Proxy =
29 declareNamedSchema Proxy =
29 openApiSchemaModifier @xs <$> genericDeclareNamedSchema (openApiOptions @xs) (Proxy @x)
30 openApiSchemaModifier @xs <$> genericDeclareNamedSchema (openApiOptions @xs) (Proxy @x)
@@ -79,7 +80,7 @@ instance (StringModifier f, OpenApiOptions xs) => OpenApiOptions (ConstructorTag
79 openApiOptions = (openApiOptions @xs) {constructorTagModifier = getStringModifier @f}
80 openApiOptions = (openApiOptions @xs) {constructorTagModifier = getStringModifier @f}
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.")) =>
83 OpenApiOptions (TagSingleConstructors ': xs)
84 OpenApiOptions (TagSingleConstructors ': xs)
85 openApiOptions = undefined
86 openApiOptions = undefined