api-tools-0.9.0.0: DSL for generating API boilerplate and docs
Safe HaskellNone
LanguageHaskell2010

Data.API.Doc

Synopsis

Documentation

callHtml :: DocInfo -> Dict -> Call -> String Source #

Generate a web page documenting a Call

dirHtml :: DocInfo -> Dict -> [Call] -> String Source #

Generate a web page documenting all the Calls in a web application

data Call Source #

Documents a single method call on a resource in a web application

Constructors

Call 

Fields

Instances

Instances details
Show Call Source # 
Instance details

Defined in Data.API.Doc.Types

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

data Header Source #

Documents a HTTP header that may be supplied to a Call

Constructors

Header 

Fields

Instances

Instances details
Show Header Source # 
Instance details

Defined in Data.API.Doc.Types

data Param Source #

Documents a URL query parameter that may be included with a Call

Constructors

Param 

Fields

Instances

Instances details
Show Param Source # 
Instance details

Defined in Data.API.Doc.Types

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

data View Source #

Documents a specific view of the result data available in a Call

Constructors

View 

Fields

Instances

Instances details
Show View Source # 
Instance details

Defined in Data.API.Doc.Types

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

data Sample Source #

Example response data from a Call

Constructors

Sample 

Fields

Instances

Instances details
Show Sample Source # 
Instance details

Defined in Data.API.Doc.Types

data Body t Source #

Type for Sample response body, parameterised by possible JSON types

Constructors

EmptyBody

An empty response

JSONBody t

A JSON response of the given type

OtherBody String

A non-empty, non-JSON response

Instances

Instances details
Functor Body Source # 
Instance details

Defined in Data.API.Doc.Types

Methods

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

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

Show t => Show (Body t) Source # 
Instance details

Defined in Data.API.Doc.Types

Methods

showsPrec :: Int -> Body t -> ShowS #

show :: Body t -> String #

showList :: [Body t] -> ShowS #

data DocInfo Source #

Record of arguments that must be supplied to generate HTML documentation for a Call

Constructors

DocInfo 

Fields