Discussions

Ask a Question
Back to All

Recursive objects not being displayed

We have an API schema that contains a recursive objects, here's a simplified version of it:

"Node": {  
    "properties": {  
        "name": {"type": "string"},  
        "children": {  
        "items": {  
            "anyOf": [  
                {"$ref": "#/components/schemas/Node"},  
                {"$ref": "#/components/schemas/Leaf"}  
            ]  
        },  
        "type": "array"  
    }  
}

I'm having trouble with responses containing the recursive object listed above. When rendered by readme.io, these responses appear to have an empty body. It seems that any schema object with a recursive reference is excluded from the resulting API documentation. Can you help me with this? Is there a way for us to display those responses?