swagger-api / swagger-api/swagger-codegen
StackOverflowError on DefaultCodegen.isDiscriminatorInInterfaceTree
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
java -jar swagger-codegen-cli-2.3.1.jar generate -i bitbucket.json -l dart -o bitbucket_api -c bitbucket_pr_config.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from bitbucket.json
[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.StackOverflowError
at io.swagger.codegen.DefaultCodegen.isDiscriminatorInInterfaceTree(DefaultCodegen.java:1473)
at io.swagger.codegen.DefaultCodegen.isDiscriminatorInInterfaceTree(DefaultCodegen.java:1480)
at io.swagger.codegen.DefaultCodegen.isDiscriminatorInInterfaceTree(DefaultCodegen.java:1480)
at io.swagger.codegen.DefaultCodegen.isDiscriminatorInInterfaceTree(DefaultCodegen.java:1480)
Swagger-codegen version
swagger-codegen-cli-2.3.1.jar
also happens with 3.0
Swagger declaration file content or url
https://bitbucket.org/api/swagger.json
Command line used for generation
java -jar swagger-codegen-cli-2.3.1.jar generate -i bitbucket.json -l dart -o bitbucket_api -c bitbucket_pr_config.json
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DefaultCodegen.java at isDiscriminatorInInterfaceTree, using the repeated stack trace at lines 1473 and 1480 to inspect the recursion. Reproduce with swagger-codegen-cli-2.3.1, the Bitbucket swagger.json declaration, and the supplied Dart generation command; done means generation no longer ends in StackOverflowError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100