How to limit Depth in Swagger

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?

You could add [SwaggerExclude] to the child entities.

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.

No, that is not possible.

I didn't understand what you meant here.