✅ How to avoid stackoverflow exception in multiple recursion
I'm trying to make custom OpenApiSchema generator.
How it works: https://gist.github.com/INTERNALINTERFERENCE/34b809883d74a252ac4326a18fbce93b
So
I have three problems:
How it works: https://gist.github.com/INTERNALINTERFERENCE/34b809883d74a252ac4326a18fbce93b
So
ApiArgument, ApiReturn represent DTOs. All I need is to create OpenApiSchema by this model.I have three problems:
- I can generate OpenApiSchema for one type several times, I don't control this, and I don't understand how to do it..
- We can have cycle in dto, thats why stackoverflow exception. For example: we have
SubjectDtoandDepartmentDto.SubjectDtohas reference toDepartmentDtoandDepartmentDtohas reference toSubjectDto - It is really hard to read....
