question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Failed to generate bin/configs/python-blueplanet.yaml

See original GitHub issue

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • ~Have you validated the input using an OpenAPI validator (example)?~
  • What’s the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What’s the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

Running ./bin/generate-samples.sh bin/configs/python-blueplanet.yaml is failing with:

[pool-1-thread-4] Generation failed for python-blueplanet: (RuntimeException) Could not generate model 'ApiResponse'
java.lang.RuntimeException: Could not generate model 'ApiResponse'
        at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:520)
        at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:852)
        at org.openapitools.codegen.cmd.GenerateBatch$GenerationRunner.run(GenerateBatch.java:212)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.nio.file.NoSuchFileException: ~/src/OpenAPITools/openapi-generator/samples/server/petstore/python-blueplanet/model-definitions/types/tosca/openapi_server/ApiResponse_ResourceType.tosca
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
        at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
        at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
        at java.base/java.nio.file.Files.newOutputStream(Files.java:224)
        at java.base/java.nio.file.Files.write(Files.java:3491)
        at org.openapitools.codegen.TemplateManager.writeToFileRaw(TemplateManager.java:227)
        at org.openapitools.codegen.TemplateManager.writeToFile(TemplateManager.java:209)
        at org.openapitools.codegen.TemplateManager.writeToFile(TemplateManager.java:171)
        at org.openapitools.codegen.TemplateManager.write(TemplateManager.java:149)
        at org.openapitools.codegen.DefaultGenerator.processTemplateToFile(DefaultGenerator.java:916)
        at org.openapitools.codegen.DefaultGenerator.generateModelDocumentation(DefaultGenerator.java:358)
        at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:517)
        ... 5 more
openapi-generator version

openapi-generator-project 5.0.0-SNAPSHOT

OpenAPI declaration file content or url
generatorName: python-blueplanet
outputDir: samples/server/petstore/python-blueplanet
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/python-blueplanet
Generation Details
Steps to reproduce
$  mvn -DskipTests clean package
$ ./bin/generate-samples.sh bin/configs/python-blueplanet.yaml
Related issues/PRs
Suggest a fix
$ git rm -f bin/configs/python-blueplanet.yaml

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wing328commented, Aug 26, 2020

Let us know if you still need help on this.

0reactions
jirikuncarcommented, Sep 2, 2020

I have a workaround:

$ docker build -t og .
$ docker run -it --rm -v $(pwd):/opt/openapi-generator og ./bin/generate-samples.sh bin/configs/python-*.yaml

but still no success on macOS directly with

openjdk 14.0.1 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found