Group Group Group Group Group Group Group Group Group

KituraOpenAPI GeneratedSDK Error

When running the docker command to generate the API I get his as a result.

    docker run --rm -v ${pwd}:/local \swaggerapi/swagger-codegen-cli generate \-i /local/specification.json -l swift \-o /local/GeneratedSDK
[main] INFO io.swagger.parser.Swagger20Parser - reading from /local/specification.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from /local/specification.json
[main] ERROR io.swagger.parser.SwaggerCompatConverter - failed to read resource listing
java.lang.RuntimeException: Could not find /local/specification.json on the classpath
	at io.swagger.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:31)
	at io.swagger.parser.SwaggerCompatConverter.readResourceListing(SwaggerCompatConverter.java:206)
	at io.swagger.parser.SwaggerCompatConverter.read(SwaggerCompatConverter.java:122)
	at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:75)
	at io.swagger.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:431)
	at io.swagger.codegen.cmd.Generate.run(Generate.java:283)
	at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
[main] WARN io.swagger.codegen.ignore.CodegenIgnoreProcessor - Output directory does not exist, or is inaccessible. No file (.swagger-codegen-ignore) will be evaluated.
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
	at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:735)
	at io.swagger.codegen.cmd.Generate.run(Generate.java:285)
	at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)

The files exist in the directory.

@dokun1 @seabaylea Can you please help with this when you get a chance? Thank you - much appreciated! :]

Thanks @shogunkaramazov!

@jwalsh I see you’ve also contacted me on the Kitura Slack, and we’ve started a back and forth there. Would you like to continue our conversation there, or would you like to keep it here? Totally up to you as I respect your wishes - both are very productive forums!

Hi @dokun1, let’s keep working though this on Slack. Thanks for following up!

Hey guys, I’m not on the slack but would like to know how to solve this issue, since I’m experiencing the same. Thanks.

OK, I found it. When the present working directory has a space somewhere then we should put ${pwd} between double quotes: “${pwd}”:/local …

@hastoro11 Glad you fixed it! Cheers! :]