-
-
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
Unable to generate java client code from a version 2 OpenApi spec #320
Comments
Are you sure your spec is valid? I get following errors on http://editor.swagger.io/
|
When I execute this in swagger-codegen, it works.
|
Also
|
I removed the errors displayed in http://editor.swagger.io/ (though this is a snippet from our current spec that we have in production, so I don't know why these show as errors). Here is the updated spec file. It still has the issues reported. Seems to be around the discriminator.
|
I have filed swagger-api/swagger-parser#740 maybe you can add a comment there to explain that it was working with a previous version of |
@jmini Thank you |
swagger-api/swagger-parser#740 is now merged. How do we pick this up from swagger-parser? |
I have opened swagger-api/swagger-parser#780 to ask the Swagger-Parser team for the next release. Feel free to let a comment on this issue. I hope that we will have a new version of Swagger-Parser with our next |
The issue in Swagger-Parser was fixed, and with PR #696 OpenAPI-Generator was updated to use a version containing the fix. This issue reported here, should no longer appear with the newest |
When I execute the same command with the same yaml file, it does seem to execute correctly. Note: This is without --verbose
However, when I execute the same command with "--verbose", there seem to be some issues that still need to be resolved, though probably not related to the swagger-parser issue.
Are these errors an issue? Should we create a separate issue for this? |
Can't reproduce the error with verbose on latest master :
|
tested with latest v7.0.0 and no longer seeing exceptions generating code. |
Description
I am trying to generate a java client from an Open API version 2 spec. But the generator does not validate the spec.
openapi-generator version
3.0.1, 3.0.2-SNAPSHOT
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Output:
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: