Haskell-OpenAPI-Code-Generator / Haskell-OpenAPI-Client-Code-Generator

Generate Haskell client code from an OpenAPI 3 specification
46 stars 19 forks source link

Support for aeson-2.0 #77

Closed s9gf4ult closed 2 years ago

s9gf4ult commented 2 years ago

There are new incompatibilities in aeson-2.0.0.0.

Particularly, the KeyMap which is used instead of Map Text Value in Object constructor.

The code generated does not compile with aeson-2 and later.

NorfairKing commented 2 years ago

@joelfisch ^ This is the issue that I ran into as well.

joel-bach commented 2 years ago

Hi @s9gf4ult, I created a PR to support aeson 2 here: https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/pull/78 Could you check if this works for you?

@NorfairKing It seems the fix only includes the pre-written file and not the generated files, therefore I do not think it is worth it ATM to switch to autodocodec because of this issue.

joel-bach commented 2 years ago

Closing this since I have tests in CI testing it with Aeson 2.0. Please reopen it or create a new issue if it does not work for you or I missed something.