Open mhoffman78 opened 6 years ago
There's no attached anything...
You really need to provide more details, like the process you've taken and your API definition in order for us to try and reproduce and solved it.
I am trying to execute the following code from Gradle - I am not sure if I am missing a config file? It looks to be throwing the error on DefaultGenerator's generateModels() via the generate() method.
`import io.swagger.codegen.config.CodegenConfigurator import io.swagger.codegen.DefaultGenerator
def swaggerInput = "${rootDir}/petstore.json" def securityDefinition = "${rootDir}/securityDefinition.json" def swaggerOutputDir = file('build/swagger') task generateApi { inputs.file(swaggerInput) outputs.dir(swaggerOutputDir) doLast { def config = new CodegenConfigurator() config.setInputSpec(swaggerInput) config.setOutputDir("${project.buildDir.path}") config.setLang('java') config.setTemplateDir("${rootDir}") config.setAdditionalProperties([ 'interfaceOnly' : 'true', 'apiPackage' : 'io.swagger.petstore.client.api', 'dateLibrary' : 'java8', 'sourceFolder' : 'src/generated/java' ]) //config.setAuth(securityDefinition); config.setImportMappings([ 'Dog': 'io.swagger.petstore.client.model.Dog' ]) println 'Here1' println config.getAuth() def test = new DefaultGenerator(); println 'Here2' println config.getTemplateDir() test.opts(config.toClientOptInput()); println 'Here3' test.generate(); } }`
Description
Trying to run a Service First approach to generate YAML from a simple POJO. Please see the attached stacktrace
Swagger-codegen version
3.0.0-rc
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement