rest-gen-0.9.0.5: Documentation and client generation from rest definition.

Safe HaskellNone

Rest.Gen.Base.ActionInfo

Contents

Synopsis

The types describing a resource's actions.

type ResourceId = [String]Source

Representation of resource

data RequestMethod Source

Intermediate data representation of Rest structure

Constructors

GET 
POST 
PUT 
DELETE 

data ActionTarget Source

Constructors

Self 
Any 

data DataType Source

Constructors

String 
XML 
JSON 
File 
Other 

Instances

Traverse a resource's Schema and Handlers to create a [ActionInfo].

topLevelActionInfo :: Resource m s sid mid aid -> Cardinality sid mid -> [ActionInfo]Source

stepActionInfo :: Resource m s sid mid aid -> Step sid mid aid -> [ActionInfo]Source

namedActionInfo :: Resource m s sid mid aid -> String -> Endpoint sid mid aid -> [ActionInfo]Source

unnamedActionInfo :: Resource m s sid mid aid -> Cardinality (Id sid) (Id mid) -> [ActionInfo]Source

getterActionInfo :: Resource m s sid mid aid -> String -> Getter sid -> [ActionInfo]Source

listGetterActionInfo :: Resource m s sid mid aid -> String -> Getter mid -> [ActionInfo]Source

singleActionInfo :: Resource m s sid mid aid -> Maybe (Id sid) -> String -> [ActionInfo]Source

Smart constructors for ActionInfo.

Utilities for extraction information from Handlers.

paramNames :: Param a -> [String]Source

A Param can contain the same parameter multiple times. For example, offset and count are added in Rest.Handler.mkListing, and in Rest.Driver.Routing.mkListHandler. For that reason, we nub here.

handlerInputs :: Handler m -> [DataDescription]Source

Extract input description from handlers

handlerOutputs :: Handler m -> [DataDescription]Source

Extract output description from handlers

handlerErrors :: Handler m -> [DataDescription]Source

Extract input description from handlers

typeString :: forall a. Typeable a => Proxy a -> StringSource

modString :: forall a. Typeable a => Proxy a -> [String]Source

actionIdent :: forall a. Ident a -> IdentSource