[PowerShell-Experimental] java.lang.StackOverflowError - while running OAS spec containing circular references
Created by: kisundar
Description
While running OAS v3 spec containing circular references throws java.lang.StackOverflowError
openapi-generator Version
4.3.0-20200319.082058-209
Exception in thread "main" java.lang.StackOverflowError
at java.lang.StringBuilder.append(StringBuilder.java:136)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:760)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:763)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:750)
at org.openapitools.codegen.languages.PowerShellExperimentalClientCodegen.constructExampleCode(PowerShellExperimentalClientCodegen.java:718)
OpenAPI declaration file content or url
Command line used for generation
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i https://gist.github.com/kisundar/0a1f9c715f2835a70fc055b088300d08#file-intersight-openapi-v3-1-0-9-json -g powershell-experimental -o <output-dir>
Steps to reproduce
Execute the above command to reproduce the issue