This fixes an issue we were seeing where large schemas would have missing properties in the examples.
Previously, because options are shared between recursive calls, only a maximum of 100 properties would be rendered in total. (It would be less if $ref are used, because the indirection counts towards the limit).
Since the fix in #190 prevents circular examples from ending in an infinite loop, I removed the "depth" check. I've tested it with the referenced billing.yaml example and it works fine. If you prefer I can leave it in, though since it now truly checks for depth, 100 would be a pretty high limit, so I don't think it adds anything.
Also if the same $ref is used multiple times in the same schema, even if not recursive, it would previously only render the first occurrence.
Here's an example of billing.yaml before and after:
Notice that id was missing in a lot of places because it is a $ref and is used on the top level already, so it was not render it in nested objects.
Recursive examples like this still work: (Service object which contains a nested Service object + ServicePeriod which has nested ServicePeriod)
This fixes an issue we were seeing where large schemas would have missing properties in the examples.
Previously, because
options
are shared between recursive calls, only a maximum of 100 properties would be rendered in total. (It would be less if$ref
are used, because the indirection counts towards the limit).Since the fix in #190 prevents circular examples from ending in an infinite loop, I removed the "depth" check. I've tested it with the referenced billing.yaml example and it works fine. If you prefer I can leave it in, though since it now truly checks for depth, 100 would be a pretty high limit, so I don't think it adds anything.
Also if the same
$ref
is used multiple times in the same schema, even if not recursive, it would previously only render the first occurrence.Here's an example of billing.yaml before and after:
Notice that
id
was missing in a lot of places because it is a$ref
and is used on the top level already, so it was not render it in nested objects.Recursive examples like this still work: (
Service
object which contains a nestedService
object +ServicePeriod
which has nestedServicePeriod
)