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
We have been using the 3.0.0 branch of swagger-codegen to generate som code for our rest APIs. It was working fine until I took a pull of swagger-codegen. I have tracked the issue down to a change made on the 23 of February 2019 in this project (swagger-codegen-generators):
"added contenttype extension for response schema. Hugo Mercado 2019-02-23 20:00"
There was a change then in the file DefaultCodegenConfig on rows: 3755-3757.
Now when I use for instance this yaml to generate:
I get a NullPointerException in Default.CodegenConfig.getSchemaFromResponse. Heres part of the log with the error:
12:49:57.957 [Thread-1] DEBUG io.swagger.codegen.v3.config.CodegenConfigurator - getClientOptInput - parsed inputSpecURL ../authentication-api-1.0.yml
12:49:58.146 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - About to parse: /handlebars/cpp/model-header.mustache
12:49:58.199 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Building AST
12:49:58.241 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Applying Mustache spec
12:49:58.250 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Creating templates
12:49:58.277 [Thread-1] INFO io.swagger.codegen.v3.AbstractGenerator - writing file /var/tmp/authentication-client/example/api/authentication/AuthenticationTokenRequest.h
java.lang.NullPointerException
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.getSchemaFromResponse(DefaultCodegenConfig.java:3773)
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.fromResponse(DefaultCodegenConfig.java:2192)
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.fromOperation(DefaultCodegenConfig.java:1903)
at io.swagger.codegen.v3.DefaultGenerator.processOperation(DefaultGenerator.java:847)
at io.swagger.codegen.v3.DefaultGenerator.processPaths(DefaultGenerator.java:774)
at io.swagger.codegen.v3.DefaultGenerator.generateApis(DefaultGenerator.java:419)
at io.swagger.codegen.v3.DefaultGenerator.generate(DefaultGenerator.java:722)
at io.swagger.codegen.v3.cli.cmd.Generate.run(Generate.java:342)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "Thread-1" java.lang.RuntimeException: Could not process operation:
Tag: class Tag {
name: /authentication
description: null
externalDocs: null
}
Operation: loginWithToken
Resource: post /authentication/#_with_token
Exception: null
at io.swagger.codegen.v3.DefaultGenerator.processOperation(DefaultGenerator.java:872)
at io.swagger.codegen.v3.DefaultGenerator.processPaths(DefaultGenerator.java:774)
at io.swagger.codegen.v3.DefaultGenerator.generateApis(DefaultGenerator.java:419)
at io.swagger.codegen.v3.DefaultGenerator.generate(DefaultGenerator.java:722)
at io.swagger.codegen.v3.cli.cmd.Generate.run(Generate.java:342)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.getSchemaFromResponse(DefaultCodegenConfig.java:3773)
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.fromResponse(DefaultCodegenConfig.java:2192)
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.fromOperation(DefaultCodegenConfig.java:1903)
at io.swagger.codegen.v3.DefaultGenerator.processOperation(DefaultGenerator.java:847)
... 5 more
The text was updated successfully, but these errors were encountered:
@Discordia this has been fixed with #330 , can you please check when you have a chance? if you find something wrong, please don't hesitate to let me know.
We have been using the 3.0.0 branch of swagger-codegen to generate som code for our rest APIs. It was working fine until I took a pull of swagger-codegen. I have tracked the issue down to a change made on the 23 of February 2019 in this project (swagger-codegen-generators):
"added contenttype extension for response schema. Hugo Mercado 2019-02-23 20:00"
There was a change then in the file DefaultCodegenConfig on rows: 3755-3757.
Now when I use for instance this yaml to generate:
I get a NullPointerException in Default.CodegenConfig.getSchemaFromResponse. Heres part of the log with the error:
The text was updated successfully, but these errors were encountered: