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

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

Use NonEmpty for arrays that specify minItems > 0 #102

Closed pbrisbin closed 5 months ago

pbrisbin commented 5 months ago

Use NonEmpty for arrays that specify minItems > 0

a89d27d

Exercise minItems/NonEmpty in golden tests

325816a

pbrisbin commented 5 months ago

Oh no, I'm sorry for all the reformatting my editor did. I forgot to turn that off. Let me figure out how to back that off :/

joel-bach commented 5 months ago

Thank you a lot for this PR!

Good catch regarding the example code! I have not used/updated this in a long while as I use the golden tests more regularly. Especially for showing the change in the code generation, this would be the place to do it. Could you update the PR to change specifications/z_complex_self_made_example.yml instead of specifications/petstore.yaml? You can then update the golden tests with ./update_golden_and_example.sh. I noticed that currently the compilation check of the example was not included in the CI, so I updated this part in this PR: https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/pull/103 With this you should be able to drop the test-update-commit.

Once this is cleaned up, I am happy to merge this PR!

pbrisbin commented 5 months ago

Done and done. Thanks for the continued quick engagement!