You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release 2.2.3 crashes when processing our swagger.json. The stacktrace is:
Exception: null
at io.swagger.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:861)
at io.swagger.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:764)
at io.swagger.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:388)
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:700)
at io.swagger.codegen.cmd.Generate.run(Generate.java:244)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:43)
Caused by: java.lang.NullPointerException
at io.swagger.codegen.languages.AbstractJavaCodegen.needToImport(AbstractJavaCodegen.java:912)
at io.swagger.codegen.DefaultCodegen.fromOperation(DefaultCodegen.java:2219)
at io.swagger.codegen.languages.AbstractJavaCodegen.fromOperation(AbstractJavaCodegen.java:974)
at io.swagger.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:808)
... 5 more
Swagger-codegen version
2.2.3. This is a regression.
Swagger declaration file content or url
This is a slightly sanitized/abbreviated version of the JSON. The operation is a method that POSTs an array of string identifiers as body content. The JSON itself is being generated dynamically by an application.
Looks like the problem is this line from commit d35239c. For arrays of native types, innerCp.complexType is null, but there's no null check here.
tingley
changed the title
[JAVA] NullPointerException importing body parameters
[JAVA] NullPointerException processing operation with string array body parameter
Jul 19, 2017
Description
Release 2.2.3 crashes when processing our swagger.json. The stacktrace is:
Swagger-codegen version
2.2.3. This is a regression.
Swagger declaration file content or url
This is a slightly sanitized/abbreviated version of the JSON. The operation is a method that POSTs an array of string identifiers as body content. The JSON itself is being generated dynamically by an application.
Command line used for generation
Steps to reproduce
Related issues/PRs
Possibly issue #6098.Suggest a fix/enhancement
git bisect
indicates that this crash results from changes introduced in commit d35239c.The text was updated successfully, but these errors were encountered: