api-tools-0.8.0.1: 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

data Header Source #

Documents a HTTP header that may be supplied to a Call

Constructors

Header 

Fields

Instances

data Param Source #

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

Constructors

Param 

Fields

Instances

data View Source #

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

Constructors

View 

Fields

Instances

data Sample Source #

Example response data from a Call

Constructors

Sample 

Fields

Instances

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

Functor Body Source # 

Methods

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

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

Show t => Show (Body t) Source # 

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