servant-swagger-ui-core-0.3.2: Servant swagger ui core components

Safe HaskellNone
LanguageHaskell2010

Servant.Swagger.UI.Core

Contents

Synopsis

Swagger UI API

type SwaggerSchemaUI (dir :: Symbol) (schema :: Symbol) = SwaggerSchemaUI' dir (schema :> Get '[JSON] Swagger) Source #

Swagger schema + ui api.

SwaggerSchemaUI "swagger-ui" "swagger.json" will result into following hierarchy:

/swagger.json
/swagger-ui
/swagger-ui/index.html
/swagger-ui/...

type SwaggerSchemaUI' (dir :: Symbol) (api :: *) = api :<|> (dir :> (Get '[HTML] (SwaggerUiHtml dir api) :<|> (("index.html" :> Get '[HTML] (SwaggerUiHtml dir api)) :<|> Raw))) Source #

Use SwaggerSchemaUI' when you need even more control over where swagger.json is served (e.g. subdirectory).

Implementation details

data SwaggerUiHtml (dir :: Symbol) (api :: *) Source #

Index file for swagger ui.

It's configured by the location of swagger schema and directory it lives under.

Implementation detail: the index.html is prepopulated with parameters to find schema file automatically.

Constructors

SwaggerUiHtml Text 
Instances
(KnownSymbol dir, HasLink api, Link ~ MkLink api Link, IsElem api api) => ToMarkup (SwaggerUiHtml dir api) Source # 
Instance details

Defined in Servant.Swagger.UI.Core

data Handler a #

Instances
Monad Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

(>>=) :: Handler a -> (a -> Handler b) -> Handler b #

(>>) :: Handler a -> Handler b -> Handler b #

return :: a -> Handler a #

fail :: String -> Handler a #

Functor Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Applicative Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

pure :: a -> Handler a #

(<*>) :: Handler (a -> b) -> Handler a -> Handler b #

liftA2 :: (a -> b -> c) -> Handler a -> Handler b -> Handler c #

(*>) :: Handler a -> Handler b -> Handler b #

(<*) :: Handler a -> Handler b -> Handler a #

MonadIO Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

liftIO :: IO a -> Handler a #

MonadThrow Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

throwM :: Exception e => e -> Handler a #

MonadCatch Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

catch :: Exception e => Handler a -> (e -> Handler a) -> Handler a #

MonadError ServantErr Handler 
Instance details

Defined in Servant.Server.Internal.Handler

MonadBase IO Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Methods

liftBase :: IO α -> Handler α #

MonadBaseControl IO Handler 
Instance details

Defined in Servant.Server.Internal.Handler

Associated Types

type StM Handler a :: * #

Generic (Handler a) 
Instance details

Defined in Servant.Server.Internal.Handler

Associated Types

type Rep (Handler a) :: * -> * #

Methods

from :: Handler a -> Rep (Handler a) x #

to :: Rep (Handler a) x -> Handler a #

type StM Handler a 
Instance details

Defined in Servant.Server.Internal.Handler

type Rep (Handler a) 
Instance details

Defined in Servant.Server.Internal.Handler

type Rep (Handler a) = D1 (MetaData "Handler" "Servant.Server.Internal.Handler" "servant-server-0.14.1-4twqt4c8drJJ1apobZztxV" True) (C1 (MetaCons "Handler" PrefixI True) (S1 (MetaSel (Just "runHandler'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ExceptT ServantErr IO a))))