{-# OPTIONS_GHC -Wno-orphans #-}
module WebGear.Swagger.Trait.Auth () where
import Data.Proxy (Proxy (..))
import Data.Swagger (
Definitions,
NamedSchema,
Schema,
ToSchema (..),
)
import Data.Swagger.Declare (Declare)
import WebGear.Core.Trait.Auth.Common (AuthToken)
instance ToSchema (AuthToken scheme) where
declareNamedSchema :: Proxy (AuthToken scheme) -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy (AuthToken scheme)
-> Declare (Definitions Schema) NamedSchema
declareNamedSchema Proxy (AuthToken scheme)
_ = Proxy String -> Declare (Definitions Schema) NamedSchema
forall a.
ToSchema a =>
Proxy a -> Declare (Definitions Schema) NamedSchema
declareNamedSchema (Proxy String -> Declare (Definitions Schema) NamedSchema)
-> Proxy String -> Declare (Definitions Schema) NamedSchema
forall a b. (a -> b) -> a -> b
$ forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @String