solga-swagger-0.1.0.2: Swagger generation for Solga

Safe HaskellNone
LanguageHaskell2010

Solga.Swagger

Contents

Synopsis

Documentation

genSwagger :: RouterSwagger r => Proxy r -> Either (Text, Context) Swagger Source #

Generate a Swagger specification for a given type.

class RouterSwagger r where Source #

A type for which we can generate a Swagger specification.

Instances

RouterSwagger Raw Source # 
RouterSwagger RawResponse Source # 
RouterSwagger next => RouterSwagger (End next) Source # 

Methods

genPaths :: Proxy * (End next) -> Context -> GenPathsM Paths Source #

ToSchema a => RouterSwagger (JSON a) Source # 
RouterSwagger next => RouterSwagger (ExtraHeaders next) Source # 
RouterSwagger next => RouterSwagger (NoCache next) Source # 
RouterSwagger next => RouterSwagger (WithIO next) Source # 
(KnownSymbol seg, RouterSwagger next) => RouterSwagger (Seg seg next) Source # 

Methods

genPaths :: Proxy * (Seg seg next) -> Context -> GenPathsM Paths Source #

(RouterSwagger left, RouterSwagger right) => RouterSwagger ((:<|>) left right) Source # 

Methods

genPaths :: Proxy * (left :<|> right) -> Context -> GenPathsM Paths Source #

(KnownSymbol seg, RouterSwagger next, RouterSwagger (OneOfSegs segs next)) => RouterSwagger (OneOfSegs ((:) Symbol seg segs) next) Source # 

Methods

genPaths :: Proxy * (OneOfSegs ((Symbol ': seg) segs) next) -> Context -> GenPathsM Paths Source #

RouterSwagger (OneOfSegs ([] Symbol) next) Source # 
(Typeable * a, ToParamSchema a, RouterSwagger next) => RouterSwagger (Capture a next) Source # 

Methods

genPaths :: Proxy * (Capture a next) -> Context -> GenPathsM Paths Source #

(KnownSymbol m, RouterSwagger next) => RouterSwagger (Method m next) Source # 

Methods

genPaths :: Proxy * (Method m next) -> Context -> GenPathsM Paths Source #

(ToSchema a, RouterSwagger next) => RouterSwagger (ReqBodyJSON a next) Source # 
RouterSwagger (ReqBodyMultipart a next) Source # 
RouterSwagger r => RouterSwagger (K1 i r p) Source # 

Methods

genPaths :: Proxy * (K1 i r p) -> Context -> GenPathsM Paths Source #

(RouterSwagger (left p), RouterSwagger (right p)) => RouterSwagger ((:*:) left right p) Source # 

Methods

genPaths :: Proxy * ((left :*: right) p) -> Context -> GenPathsM Paths Source #

RouterSwagger (f p) => RouterSwagger (M1 i c f p) Source # 

Methods

genPaths :: Proxy * (M1 i c f p) -> Context -> GenPathsM Paths Source #

Implementation

data Context Source #

Constructors

Context 

Fields

Instances

passPaths :: (r ~ f next, RouterSwagger next) => Proxy r -> Context -> GenPathsM Paths Source #

For a Router f next, produce the same paths as next without modification.

noPaths :: Proxy r -> Context -> GenPathsM Paths Source #

Produce no paths.