-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Swagger-codegen JSON parser fails silently #448
Comments
Can you share the api-docs.json? |
I have seen this happen as well. The SwaggerCompatParser will fail completely if a single spec is not valid, and without any indication as to why |
also in this vain maybe this would help: --- a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/Codegen.java +++ b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/Codegen.java @@ -89,6 +89,7 @@ public class Codegen extends DefaultGenerator { catch (Exception e) { + e.printStackTrace(); usage(options); return; } many greetings |
I stumbled also to this as a first impression of the project. It took me a while to figure out that the problem wasn't in the options that I gave. I suggest that the
|
@webron i can email you the file the fails if that would help |
Please do. You can add Tony to the email as well. |
OK I've made this better in swagger-parser-1.0.2-SNAPSHOT. swagger-api/swagger-parser#17 Expect this to come out in a release shortly |
I am using
swagger-docs
to generate myjson
and then use this project to create my clients. For some reason (which I have not figured out yet),swagger-docs
generated invalid json for one of my APIs and when I pointswagger-codegen
at the api-docs.json file to generate the clients, it fails to produce code but doesnt say why. The only way to track this down is to pointswagger-codegen
at each individual api.json file to see which one fails.The text was updated successfully, but these errors were encountered: