-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] python-experimental stackOverflow when using self-referencing data structures like GeoJson #13043
Comments
Do you have your intelij set up so you can debug the generator? What is the stack trace? Want to sync up this week? |
I’ll get you the stack trace today. Happy to connect anytime. What time zone are you in? I’m US/East Coast.
…-Frank
(sent via my iPhone, so pardon any spelling errors)
On Jul 30, 2022, at 10:32 PM, Justin Black ***@***.***> wrote:
Do you have your intelij set up so you can debug the generator? What is the stack trace? Want to sync up this week?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
This is the output from the test case I posted. I'm on commit 79c5091
|
So it is infinitely looping in the Java layer when trying to generate an example value. My time zone is PT here and I can be reached on Slack here https://join.slack.com/t/openapi-generator/shared_invite/zt-1dluqpbf5-9DbM3xGiGjPH0hwuQvGKZg as Justin Black |
Correct. Sorry, should have put that part into the ticket. Linked issue was all about the example too.
…-Frank
(sent via my iPhone, so pardon any spelling errors)
On Jul 31, 2022, at 12:14 PM, Justin Black ***@***.***> wrote:
So it is infinitely looping in the Java layer when trying to generate an example value.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Related PR: #13109 |
Bug Report Checklist
Description
Issue 8052 fixed a bug with example values for models with circular references. The test case provided was a minimal representation of GeoJSON. While it is unclear what has changed, a full representation of the GeoJson Specification now causes an infinite recursion in python-experimental. The full GeoJson Specification "works" in the legacy generator, in that it doesn't get into an infinite loop.
openapi-generator version
6.0.1+
OpenAPI declaration file content or url
The GeoJsonGeometry used in the prior test was not exactly right and may have masked the true nature of this bug. This spec is not the full GeoJson, but it is sufficient to cause the bug. Essentially a GeoJsonGeometry is either a Point, or a GeometryCollection, and a GeometryCollection can have more GeoJsonGeometry objects. The full spec includes lines, polygons, and a few more types, but this is the minimal subset that causes the issue.
Generation Details
Steps to reproduce
This test (if placed into PythonExperimentalClientTest) will recreate the bug. Note that in my testing environment, I added the GeoJson spec (above) to the prior yaml.
Related issues/PRs
#8052
Suggest a fix
I would be happy to attempt to fix it, but I could use a little guidance from @spacether. It looks like the new generator is attempting to detect cycles, and it's unclear what about the full GeoJson specification is causing the issue. Hopefully the provided yaml and test case will shed some light on this.
The text was updated successfully, but these errors were encountered: