Open wwwlicious opened 7 years ago
Example of circular reference which 'slays'. Perhaps a reference/linking syntax would be better for returned or nested items (see openApi for an example of this)
public class Thing {
public More More { get; set; }
}
public class More {
public Thing { get; set; }
}
The reflectionenricher fails to detect circular type references in properties which leads to a stackoverflow exception.
Found this issue when trying to use
ValidationResult
as a property in a DtoResponse. It contains a property ofIRequest
which itself contains anIResponse
property which contains anIRequest
property and thus creates an infinite loop.Need to add a check when using the property enricher that it does not process a type already in the parent tree and if so instead create a symbolic link in the spec (something we don't really have afaik)