-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][java][spring][oneOf] imports that do not exist #4849
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Any news on this one? I have a similar problem in the javascript generator - creating e.g. |
FYI: I have a similar construct in a project and it works with version 3.3.4, but not with 4.2.3. I'm using the May be related to #3692 and #2906. I'm not familiar with the code, but this line looks like the feature is not finished yet: Line 108 in 466bacb
|
For Java clients this issue seems to be fixed with #5120. Maybe this fix could be applied to Java server generators... Maybe it would be a good idea to revert the code that refers to the |
The update to 4.3.0 does not seem to fix the issue.
In the generated jaxrs-cxf version two files are broken because of the two missing imports. |
Any updates/workaround on this? |
Looks like this is resolve in |
I've faced similar issue with org.openapitools It is possible related to 'REF_AS_PARENT_IN_ALLOF=true' normalizer function, because without that code generated well. |
Description
I am using openapi-codegen version 4.2.2 and openapi specification 3.0.0 on a Windows 10 Enterprise 64bit system to generate a java server API from a yaml file.
I also opened a stackoverflow question to get a possible answer. But currently I'm not sure if I have to look for the error at my place or at openapi-codegen. Therefore I have opened my first issue here today. If this is not desired, you are welcome to close the issue. It can be found here.
The problem I encounter is, that the generated code tries to import a class that does not exist. The API should accept an object of type pet and return the same pet, but it should also work with all three subtypes of Pet - Dog, Cat, Lizard.
The code generator tries to import the following classes that it did not generated:
Furthermore the generator has generated some classes which I cannot understand at my current state of knowledge
I tried using the inheritence example from the openapi specification and build the following yaml file from it:
openapi-generator version
OpenAPI declaration file content or url
I validated the yaml file with openapi-generator, but found no error or warning:
Command line used for generation
Steps to reproduce
Related issues/PRs
The same behaviour can be observed, if you generate a server API with the following command, for jaxrs-cxf:
Suggest a fix/enhancement
Regards,
skchande
The text was updated successfully, but these errors were encountered: