Comandline run with -c parameter throw java.lang.NullPointerException
scripnichenko opened this issue ยท 1 comments
scripnichenko commented
๐ Works well:
swagger-coverage-commandline -s buddle_swagger.json -i swagger-coverage-output
๐ฅ Throw java.lang.NullPointerException
swagger-coverage-commandline -s buddle_swagger.json -i swagger-coverage-output -c config.json
Where config.json
{
"writers": {
"html": {
"locale": "en",
"filename":"buddle_swagger_cov_report.html"
}
}
}
โน๏ธ Stacktrace:
[main] INFO io.swagger.parser.Swagger20Parser - reading from buddle_swagger.json
[main] INFO com.github.viclovsky.swagger.coverage.core.generator.Generator - spe
c is io.swagger.models.Swagger@119cd9a6
Exception in thread "main" java.lang.NullPointerException
at com.github.viclovsky.swagger.coverage.configuration.ConfigurationBuil
der.lambda$getResultsWriters$0(ConfigurationBuilder.java:67)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at com.github.viclovsky.swagger.coverage.configuration.ConfigurationBuil
der.getResultsWriters(ConfigurationBuilder.java:66)
at com.github.viclovsky.swagger.coverage.configuration.ConfigurationBuil
der.build(ConfigurationBuilder.java:52)
at com.github.viclovsky.swagger.coverage.core.generator.Generator.run(Ge
nerator.java:36)
at com.github.viclovsky.swagger.coverage.CommandLine.run(CommandLine.jav
a:74)
at java.util.Optional.orElseGet(Optional.java:267)
at com.github.viclovsky.swagger.coverage.CommandLine.main(CommandLine.ja
va:35)
viclovsky commented
Hi, @scripnichenko . There is a bug in documentation. Please, try this
{
"writers": {
"html": {
"type": "html",
"locale": "en",
"filename":"buddle_swagger_cov_report.html"
}
}
}
It should help.