32 Commits

Author SHA1 Message Date
Jon Schoning
2c5f8b30b4
[haskell-http-client] - update deps (#16041) 2023-07-08 19:34:37 -05:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
Jon Schoning
078232acb5
[haskell-http-client] relax Aeson constraint to allow Aeson 1 (#12486) 2022-05-27 23:22:09 -05:00
Jon Schoning
8511ce360c
[haskell-http-client] Update haskell-http-client generator to Aeson 2.x (#12309)
* Update haskell-http-client generator to Aeson 2.x

Co-authored-by: Andrea Cognolato <andrecogno@hotmail.it>
2022-05-07 17:53:52 -05:00
Jon Schoning
1247e77453
[haskell-http-client] add ability to choose additional characters in querystring which should not be encoded (e.g. "+" or ":") (fixes #3459) (#10424) 2021-09-19 02:02:22 -05:00
Jon Schoning
df877a8cf9
[haskell-http-client] fixes for GHC 9 (#10400)
- update stack/deps to LTS 18.10 for ghc-8.10.7
- fixes for GHC 9
- update samples
2021-09-14 16:15:58 -05:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
Isaac van Bakel
65a271c50b
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
2021-07-15 10:57:14 -05:00
Jon Schoning
8c5c0597ae
[haskell-http-client] avoid depending on ParseTime,FormatTime (#6861)
* [haskell-http-client] avoid depending on ParseTime,FormatTime

* [haskell-http-client] update haddocks
2020-07-04 19:52:52 -05:00
Jon Schoning
972bd8e280
[haskell-http-client] update stack; exclude problem time versions (#5589) 2020-03-13 11:40:06 -05:00
Jon Schoning
a979fd8e13
[haskell-http-client] update samples (#4073) 2019-10-05 13:28:52 -05:00
Jon Schoning
45d70e1bf3 [haskell-http-client] bump deps to LTS 14.3 (#3762) 2019-08-28 01:37:04 +08:00
Jon Schoning
c30a21ac3c
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
2019-02-28 13:04:50 -06:00
Jon Schoning
f6c21057e1
[haskell-http-client] regen samples (#709)
* [haskell-http-client] regen samples

* ensure the haskell-http-client samples are always up-to-date
2018-08-05 15:11:52 -05:00
Jon Schoning
79fafda012 [haskell-http-client] regen samples (#492) 2018-07-08 12:46:35 +08:00
Jon Schoning
34db79b9ba [haskell-http-client] update dependency versions + readme (#81) 2018-05-17 18:40:58 +08:00
Jon Schoning
68780afe9d [haskell-http-client] update samples (OAS3) (#381) 2018-05-09 10:31:28 +08:00
Jon Schoning
db02cc2ac9 [haskell-http-client] resolve oas 2.0 regressions (#198)
* [haskell-http-client] fix codegen issues

* ensure datatypeWithEnum is set on codegenParameter when is enum

* [haskell-http-client] fix isAlias + arrayModelType missing "datatype"

* [haskell-http-client] param.isListContainer is sometimes false for list types

* [haskell-http-client] gen MimeNoContent instances automatically

* [haskell-http-client] fix example-app and integration tests

* [haskell-http-client] update docs
2018-04-23 16:10:50 +08:00
Jon Schoning
2d0bafb6b2 [haskell-http-client] default InlineMimeTypes=true (#7534)
- default CLI option InlineMimeTypes to True, since it produces cleaner code

- update bounds on dependancies
2018-02-01 12:26:13 +08:00
Jon Schoning
9fba9c3255 [haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType (#7515)
- add new config options:

    cabalPackage
      Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens

    cabalVersion
      Set the cabal version number, consisting of a sequence of one or more integers separated by dots

    baseModule
      Set the base module namespace

    requestType
      Set the name of the type used to generate requests

    configType
      Set the name of the type used for configuration
2018-01-28 14:59:04 +08:00
Jon Schoning
bca2b9fb5b [haskell-http-client] handle */* mimetype correctly & split api modules & allowNonUniqueOperationIds (#7254)
* [haskell-http-client] handle */* mimetype correctly

* [haskell-http-client] generate separate api modules, for each child api

* [haskell-http-client] add cliOption "allowNonUniqueOperationIds"

When cli option "allowNonUniqueOperationIds" is true,
allows *different* API modules to contain the same operationId,
and then each API must be imported qualified.
2018-01-07 11:59:55 +08:00
Jon Schoning
538f28e568 bump stack resolver to lts-10.0 (#7221) 2017-12-20 21:55:23 +08:00
Jon Schoning
cd1c2b13e3 [haskell-http-client] refactor & promote accept mimetype to request; simplify templates (#6866)
* add AuthMethodException

* rename cli prop

* simplify templates
2017-11-05 01:41:53 +08:00
Jon Schoning
4fc52c5524 [haskell-http-client] add support for enums (#6803)
* support enums for models and operation parameters

* add generateEnums cli option (default: true)

* bump stack resolver: lts-9.10
2017-10-29 00:45:13 +08:00
Jon Schoning
5219035b3a [haskell-http-client] handle Alias models + refactoring. (#6712)
* handle Alias models with newtypes

* add inlineConsumesContentTypes cli option

* generate swagger.yaml instead of swagger.json

* check for/validate unhandled authMethods

* refactoring
2017-10-18 10:47:56 +08:00
Jon Schoning
db67840ded [haskell-http-client] bug fixes; path & newtype generation issues (#6638)
* fix path generation/param-substitution issues

* fix newtype de-duplication issues

* refactoring only

* correct version in comments

* prevent duplicate MimeTypes

* sort parameter newtypes
2017-10-10 23:01:48 +08:00
Jon Schoning
5b32e886f4 [haskell-http-client] add support for auth methods (#6622)
* add support for auth methods

* use newtypes for required params

* fix duplicate operationId issues

* prevent aliasing of vendorextension references in fromOperation

* add --fast to stack ci build
2017-10-07 17:12:48 +08:00
Jon Schoning
8bd7d3912b [haskell-http-client] fixes for fake-endpoints (#6597)
* fix compile errors / sanitization for petstore-with-fake-endpoints-models-for-testing.yaml
* correct mimetype logic
* add makefile
2017-10-01 18:18:46 +08:00
Jon Schoning
d928617b69 [haskell-http-client] use katip logger, default strict (#6478)
* change strictFields cli option default to True;

* use katip logging; add cli-option for monad-logger

* fix date parsing

* remove package.yaml
2017-09-19 01:24:38 +08:00
Jon Schoning
4fb612c2e8 [haskell-http-client] update documentation; refactoring; add 'strictFields' cli option (#6458)
* update readme; remove unused DeriveAnyClass extension

* refactor request/param utility functions

* add strictFields cli option

* add CONTRIBUTING.md
2017-09-09 17:11:46 +08:00
Jon Schoning
4310ea326c [haskell-http-client] update readme; improve lens generation; fix dateFormat (#6448)
* point readme links to canonical locations

* use lenses for non-required model fields, instead of traversals

* fix .gitignore generation

* fix dateFormat cli option bug
2017-09-07 23:17:49 +08:00
Jon Schoning
c7d145a4ba add haskell-http-client-generator (#6429) 2017-09-06 00:33:48 +08:00