Module
Payload.Spec
- Package
- purescript-payload
- Repository
- hoodunit/purescript-payload
This module contains all of the types and kinds that can appear in an API spec.
#Routes Source
data Routes (path :: Symbol) routesSpec
Defines a type-level parent route. Takes a path, which
is prepended to all child routes, and a spec, which must
be a type-level record. If the path contains named URL parameters,
the types of those parameters must be given in the params
field
of the spec record. Can optionally contain a guards
field with
a list of guards to run before calling child routes. All other
fields are treated as endpoint routes or sub-parent routes.
Example:
Routes "/users/<userId>" {
guards :: Guards ("apiKey" : Nil),
params :: { userId :: Int },
posts :: GET "/posts" {
response :: UserPosts
}
}
Constructors
- Modules
- Payload.
Client - Payload.
Client. ClientApi - Payload.
Client. DecodeResponse - Payload.
Client. EncodeBody - Payload.
Client. EncodeParam - Payload.
Client. Internal. EncodeUri - Payload.
Client. Internal. Query - Payload.
Client. Internal. Url - Payload.
Client. Options - Payload.
Client. QueryParams - Payload.
Client. Queryable - Payload.
Client. Response - Payload.
ContentType - Payload.
Debug - Payload.
Headers - Payload.
Internal. QueryParsing - Payload.
Internal. Route - Payload.
Internal. UrlParsing - Payload.
Internal. Utils - Payload.
ResponseTypes - Payload.
Server - Payload.
Server. Cookies - Payload.
Server. DecodeBody - Payload.
Server. Guards - Payload.
Server. Handleable - Payload.
Server. Handlers - Payload.
Server. Internal. GuardParsing - Payload.
Server. Internal. MimeTypes - Payload.
Server. Internal. OmitEmpty - Payload.
Server. Internal. Query - Payload.
Server. Internal. Querystring - Payload.
Server. Internal. Request - Payload.
Server. Internal. ServerResponse - Payload.
Server. Internal. Trie - Payload.
Server. Internal. Url - Payload.
Server. Internal. UrlString - Payload.
Server. Params - Payload.
Server. Path - Payload.
Server. QueryParams - Payload.
Server. Response - Payload.
Server. Routable - Payload.
Server. Status - Payload.
Spec - Payload.
TypeErrors