webapi
webapi copied to clipboard
WAI based library for web api
Currently we use the data present in `schemaProperties` in order to get the details of the record fields and their types for data types in `Definitions`. This is done in...
Example snippet of Swagger Yaml : ``` lastPing: example: '2015-03-03T02:37:22.492Z' format: int64 type: string ``` In this case we would probably need to ask for user-input or ask the user...
Currently we are blindly generating `ToJSON` and `FromJSON` instances for generated types in `Types.hs`. We need to have a look at `ContentTypes` (if set) in the `Contract` in order to...
Default Parameter types can be specified for all `Param` types with the exception of Path params. Path params are always required. We need to make sure that default Parameter types...
After the generated `Types` folder is entirely restructured, we will need to check if all necessary instances are generated correctly. We will need to generate `FromParam` and `ToParam` instances only...
Response Headers can be defined in the [`Response`](http://hackage.haskell.org/package/swagger2-2.3.0.1/docs/Data-Swagger.html#t:Response) data type in the `Swagger` doc. We need to calculate their types and make sure they will be included in the Contract...
`Swagger 2.0` has support for `Default Responses`, where in we can specify what to default to incase we receive a response code that is not present in the list of...
For the global `consumes` and `produces` present in `_swaggerConsumes` and `_swaggerProduces` respectively, we need to consider these types and set the types in the `Contract` correctly. `consumes` -> `RequestBody` (in...
The code is written in such a way that we expect the definitions of data in the Definitions HashMap to be complex Arrays/Objects. Consider the following Definition entry in the...
Consider the following case (Swagger file) : ``` '480': description: NoSuchDistribution schema: $ref: '#/definitions/NoSuchDistribution' '481': description: AccessDenied schema: $ref: '#/definitions/AccessDenied' ``` Also, let's assume that in the definitions for `AccessDenied`...