If a POST-call gets a recursive structure (e.g., a Tree) as one of its parameter, the swift4 generator crashes when trying to generate example.
master/4.0.0 introduced by #2666
https://gist.github.com/lemoinem/0b3d7d065d9337a898d5ee2bc49654a2
./bin/swift4-petstore.sh while the yaml is stored at modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml./bin/swift4-petstore.shThis was probably introduced by #2666 which doesn't check for recursive structure when creating an example.
At the very least, generating example/self-documentation should be optional and should fail gracefully.
At the most, the constructExampleCode method should check for recursive structures (circular references) and fail gracefully in this case.
Any updates about this problem?
This was probably introduced by #2666 which doesn't check for recursive structure when creating an example.
@wing328 could you please look into this?
I'm having the same error. Can't migrate to 4.X.X because of this.
Most helpful comment
Any updates about this problem?