Added typeable superclass

This commit is contained in:
iko 2021-05-01 18:52:10 +03:00
parent 29e7d7ec58
commit c0c7c3d300
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -4,4 +4,4 @@ packages:
- .
extra-deps:
- openapi3-3.0.0.1@sha256:205669d14c5b48d2275e0bac41d78c9bfdb925ef9a8e3265662ce51a9e6d8139,4641
- openapi3-3.1.0