-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vcloud openapi v37.2 Java generation #14
Comments
Nevermind - duplicate of #3 Not sure how I missed that. |
Perhaps I'm being dense, but after applying the patch the resulting generated code still won't compile, albeit with slightly different behavior. In
and various other classes are complaining that "_type cannot be resolved to a variable" as well as duplicate field/method complaints. |
Hello, I've just checked the patch script. That one is not relevant any more, I'll provide working one as soon as possible. Please bear in mind that it is still a temporary solution until openapi codegen is fixed. |
Thanks in advance. Understood, that it's just temporary and I appreciate the patch. |
I've updated patch scripts and README accordinly, see for details: Known Issues . The patch works for a java codegenerated client only. Let me know if there are issues. |
I'm attempting to use the 37.2.json spec to generate java objects via
openapi-generator-cli-6.6.0
running under JDK11 and the resulting maven project won't build due to errors related to the "type" variable derived from the spec. I was seeing this same issue when using the 37.0 spec as well.In short, it appears that "type" and "_type" in the generated VcloudQueryResultRecordType class conflict. Specifically:
Which results in these 3 methods being duplicated in VcloudQueryResultRecordType (once for "type" and once for "_type"):
This in-turn throws off any other generated VcloudQueryResult* classes which descend from VcloudQueryResultRecordType.
From what I can tell, the "_type" discriminator is the root of my problems (from the spec):
Is there a particular option I need to provide to
openapi-generator-cli-6.6.0
to generate better/compiling Java? I've attempted with various combinations ofdiscriminatorCaseSensitive
,legacyDiscriminatorBehavior
,x-discriminator-value
, etc - but none of those appear to make any difference in the generated output. Perhaps I'm looking in the wrong place WRT the discriminator value?Thanks in advance.
The text was updated successfully, but these errors were encountered: