Bug Report Checklist
Description
Using the servant-client generator, code that has a syntax error gets generated.
openapi-generator version
4.0.0
OpenAPI declaration file content or url
https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
Steps to reproduce
wget https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
# that one fails as its not a valid spec
java -jar openapi-generator-cli-4.0.0.jar generate -i spec3.json -g haskell
# skipping validation
java -jar openapi-generator-cli-4.0.0.jar generate -i spec3.json--skip-validate-spec -g haskell
# stack build
[snip]
[1 of 2] Compiling Stripe.Types ( lib/Stripe/Types.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Stripe/Types.o )
/home/mrh-dev/devel/test/lib/Stripe/Types.hs:603:55: error: parse error on input ‘;’
|
603 | { accountBusinessUnderscoreprofile :: Maybe AnyOf<accountBusinessProfile> -- ^ Optional information related to the business.
|
Other notes
The stripe spec is not valid, but AFAIK the generator skips over the invalid parts. So the syntax error could or could not relate to the "invalidness".
Related issues/PRs
could find none.
Suggest a fix
Sorry, my familiarity with this code base is too low to recommend a good one. I suspect that java syntax somehow leaks into the haskell gennerator, the escaped < and > could be java generics syntax.
Bug Report Checklist
Description
Using the
servant-clientgenerator, code that has a syntax error gets generated.openapi-generator version
4.0.0OpenAPI declaration file content or url
https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
Steps to reproduce
Other notes
The stripe spec is not valid, but AFAIK the generator skips over the invalid parts. So the syntax error could or could not relate to the "invalidness".
Related issues/PRs
could find none.
Suggest a fix
Sorry, my familiarity with this code base is too low to recommend a good one. I suspect that java syntax somehow leaks into the haskell gennerator, the escaped
<and>could be java generics syntax.