fork of hey-api/openapi-ts because I need some additional things
at main 54 lines 1.1 kB view raw
1{ 2 "openapi": "3.1.0", 3 "info": { 4 "title": "Recursive Schema Test", 5 "version": "1.0.0" 6 }, 7 "paths": { 8 "/tree": { 9 "get": { 10 "operationId": "getTree", 11 "responses": { 12 "200": { 13 "description": "Success", 14 "content": { 15 "application/json": { 16 "schema": { 17 "type": "array", 18 "items": { 19 "$ref": "#/components/schemas/TreeNode" 20 } 21 } 22 } 23 } 24 } 25 } 26 } 27 } 28 }, 29 "components": { 30 "schemas": { 31 "TreeNode": { 32 "type": "object", 33 "properties": { 34 "id": { 35 "type": "string" 36 }, 37 "name": { 38 "type": "string" 39 }, 40 "createdAt": { 41 "type": "string", 42 "format": "date-time" 43 }, 44 "children": { 45 "type": "array", 46 "items": { 47 "$ref": "#/components/schemas/TreeNode" 48 } 49 } 50 } 51 } 52 } 53 } 54}