| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Data.API.Doc
Synopsis
- callHtml :: DocInfo -> Dict -> Call -> String
- dirHtml :: DocInfo -> Dict -> [Call] -> String
- data Call = Call {- call_http_method :: HTTPMethod
- call_path :: [String]
- call_description :: String
- call_auth_required :: Bool
- call_headers :: [Header]
- call_body :: Maybe (APIType, String)
- call_params :: [Param]
- call_views :: [View]
- call_samples :: [Sample]
 
- data Header = Header {}
- data Param = Param {}
- data View = View {}
- data Sample = Sample {}
- data Body t
- data DocInfo = DocInfo {- doc_info_call_url :: HTTPMethod -> [String] -> URL
- doc_info_type_url :: TypeName -> URL
 
- type URL = String
- type HTTPMethod = String
- type StatusCode = Int
- renderAPIType :: DocInfo -> APIType -> String
- renderBodyType :: DocInfo -> Body APIType -> String
- mk_link :: URL -> String -> String
Documentation
dirHtml :: DocInfo -> Dict -> [Call] -> String Source #
Generate a web page documenting all the Calls in a web
 application
Documents a single method call on a resource in a web application
Constructors
| Call | |
| Fields 
 | |
Documents a HTTP header that may be supplied to a Call
Constructors
| Header | |
| Fields 
 | |
Documents a URL query parameter that may be included with a Call
Constructors
| Param | |
| Fields 
 | |
Example response data from a Call
Constructors
| Sample | |
| Fields 
 | |
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
Record of arguments that must be supplied to generate HTML
 documentation for a Call
Constructors
| DocInfo | |
| Fields 
 | |
type HTTPMethod = String Source #
type StatusCode = Int Source #