openapi3-code-generator-0.2.0.0: OpenAPI3 Haskell Client Code Generator
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPI.Generate.Response

Description

This module contains the utilities to define the data types of the response type of an operation

Synopsis

Documentation

getResponseDefinitions Source #

Arguments

:: OperationObject

The operation to generate the response types for

-> (Text -> Text)

A function which appends the passed Text to the operation name and returns it

-> Generator (Name, Q Exp, Q Doc, Models)

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.