{ "openapi": "3.0.3", "info": { "title": "Recursive Schema Test", "version": "1.0.0" }, "paths": { "/tree": { "get": { "operationId": "getTree", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TreeNode" } } } } } } } } }, "components": { "schemas": { "TreeNode": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/TreeNode" } } } } } } }