✅ 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
ApiArgument
, ApiReturn
represent DTOs. All I need is to create OpenApiSchema
by this model.
I have three problems:
1. I can generate OpenApiSchema for one type several times, I don't control this, and I don't understand how to do it..
2. We can have cycle in dto, thats why stackoverflow exception. For example: we have SubjectDto
and DepartmentDto
. SubjectDto
has reference to DepartmentDto
and DepartmentDto
has reference to SubjectDto
3. It is really hard to read....0 Replies