Haskell-http-generator - Make endpoints which don't return anything yield NoContent (#9916)

* Make endpoints which don't return anything yield NoContent

Relevant issue: OpenAPITools/openapi-generator#9901

The haskell-http-client generator tries to generate a polymorphic return
type for endpoints which don't return anything in the success case, but
still produce content in other cases. This means that these endpoints
hit a decoding error in the success case, because there is no content to
decode.

This changes the behaviour so that endpoints that don't return anything
are *always* generated as returning NoContent, and never try to decode
the response. This change is based on a similar one for the
haskell-servant generator, which can be found at:

OpenAPITools/openapi-generator#9830

which resolved a similar issue for that generator.

* Update samples after haskell-http-client NoContent change
This commit is contained in:
Isaac van Bakel
2021-07-15 16:57:14 +01:00
committed by GitHub
parent 79866e90cf
commit 65a271c50b
22 changed files with 1395 additions and 1381 deletions

File diff suppressed because one or more lines are too long