Forum Discussion
ponelat
4 years agoStaff
Hi rickla
Small differences like that can make for a frustrating experience, I can empathize!
Could you share you gradle config related to this? And what gradle plugin are you using?
- rickla4 years agoNew Contributor
Sure, here are parts of my messy config, so it's not as if it will run, but I am not setting many options just packages etc. It's basically pasted from google examples I found just to get it running.
classpath("io.swagger.codegen.v3:swagger-codegen-maven-plugin:3.0.27")
def openAPI = new OpenAPIV3Parser().read(file.absolutePath, null, null)
def clientOpts = new ClientOptInput().openAPI(openAPI)
def config = CodegenConfigLoader.forName('java')
clientOpts.setConfig(config);
config.setApiPackage(schema.pkg)
config.setModelPackage(schema.pkg)
config.setOutputDir(generatedSourceDir)
def moreClientOpts = new ClientOpts()
moreClientOpts.setProperties([
'dateLibrary' : 'java8', // Date library to use
'apiPackage' : schema.pkg,
'modelPackage' : schema.pkg
])
clientOpts.setOpts(moreClientOpts)
println("generating")
println file.absolutePath;
config.setInputSpec(file.absolutePath)
println("generating call")
new DefaultGenerator().opts(clientOpts).generate() // Executing the generation
println("generating done") - rickla4 years agoNew Contributor
I did find a way to make it work using the cli class instead (not sure why really).
However I found that oneOf apparently doesn't work so using the generator is probably dead.
Related Content
- 8 years ago
- 8 years ago
- 3 years ago
Recent Discussions
- 7 days ago