Skip to content
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] Recursive types currently result in an endless loop. #5

Open
Supereg opened this issue Aug 30, 2021 · 0 comments
Open

[BUG] Recursive types currently result in an endless loop. #5

Supereg opened this issue Aug 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Supereg
Copy link
Member

Supereg commented Aug 30, 2021

Describe the bug

Currently creating a TypeInformation of a type will recurse into its properties without checking if the type was already encountered.
This is problematic for types like classes which may contain themselves.

Propose Solution

The TypeStore could be extended to resolve this problem, introducing references when parsing types which were already encountered.

Note: In the context of ApodiniOpenAPI, the OpenAPI exporter would probably need to ship support for Polymorphism. We countering such self references types (e.g. a tree) where no optionals are involved, you would typically introduce a terminating node in order to not get into an endless cycle. This would need to be documented.

@Supereg Supereg added the bug Something isn't working label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant