webapi
webapi copied to clipboard
Webapi-Swagger : Generate `ToX` and `FromX` instances based on ContentTypes
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 decide and generate the appropriate (ToJSON
, ToXML
...) instance .
We probably need to pass the ContentType
data in the State
and read it when generating the types.