Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains the utilities to define the data types of the response type of an operation
Synopsis
- getResponseDefinitions :: OperationObject -> (Text -> Text) -> Generator (Name, Q Exp, Q Doc)
Documentation
getResponseDefinitions Source #
:: OperationObject | The operation to generate the response types for |
-> (Text -> Text) | A function which appends the passed |
-> Generator (Name, Q Exp, Q Doc) | Returns the name of the reponse data type, the response transformation function and the document containing the definitions of all response types. |
Generates a response type with a constructor for all possible response types of the operation.
Always generates an error case which is used if no other case matches.