How to avoid circular reference in the swagger documentation?

I’m using the Documentation plugin, which generates swagger documentation from the models. I have some models with two way relations, e.g. customer has many orders, order has a customer, which is essentially a circular reference, and this results in the generated swagger models being huge, as the circular reference is generated until x cycles.
Can I somehow limit the generated model depth? Or is there another workaround for this issue?
Thanks