Is it possible to limit the nesting depth of entity classes for the Swagger documentation, similar to how the AureliusDataset does it with the Depth parameter?
for example:
TChild3 = class
...
end;
TChild2 = class
FChild = TChild3;
end;
TChild = class
FChild = TChild2;
end;
TEntity = class
FChild: TChild;
end;
Showing TEntity in swagger should only come up with definition of TChild, but not expand (or even build) definition of TChild2
Entity {
Child {
Child{}
}
}
It looks like, this is working, if there are recursions within entities (for example TChild would have an ManyValueAssoc of TEntity). But is this something, we could easily activate?
But this would exclude these for all references in swagger.
if you are looking at the definition of this entity I'd like to see these relations.
But I would like to hide these relations, if this entity is already shown by a relation.
I really don't know exactly what the issue is and what you want to achieve.
Maybe you have a sample project with the mentioned classes and a XData server generating the Swagger and please let me know what exactly is wrong with it?
There is no error at all.
Having classes referencing themselves, for example storing trees, it looks like, there is something that will stop swagger showing up classes that are to deep.
Maybe there is some attribute like XDataExcludePropertyAttribute, that would prevent swagger from expanding the sub class of this field / property.
That was my only question.
There isn't such attribute. I believe the Swagger UI JavaScript interface automatically detects cycles to avoid infinite loops, but it's out of our control. Other than this, it will show the whole tree.