-
-
Notifications
You must be signed in to change notification settings - Fork 228
feat: support for recursive and circular references #467
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
feat: support for recursive and circular references #467
Conversation
@mtovts there was already support for forward references, just not recursive or circular references. I haven't read through this yet but my guess is there is overlap with the current forward references support and should be some refactoring to reduce excess work. See |
…com/mtovts/openapi-python-client into feature/support-indirect-references
Closing per a comment that says this won't be completed: #466 (comment) |
This PR aims to support references to schemas that have not been processed yet. Please see #466.
Strategy is to create models for indirect references without properties. And fill in the properties later.
It seems related with #419. There is also support for recursive references. See example below.
Example OpenAPI:
From this OpenAPI generator produces following code:
I didn't write tests for this PR because I want to wait for feedback first. I will do so if this strategy is approved. All but one of the current tests passed. It was removed because the behavior changed.