@@ -8291,8 +8291,31 @@ private function setComponentSchema() /*: void*/
8291
8291
$ operationType = $ operation . ucfirst ($ type );
8292
8292
$ prefix = "components|schemas| $ operationType " ;
8293
8293
$ this ->openapi ->set ("$ prefix|type " , "object " );
8294
- $ this ->openapi ->set ("$ prefix|properties|name|type " , 'string ' );
8295
- $ this ->openapi ->set ("$ prefix|properties|type|type " , 'string ' );
8294
+ switch ($ type ) {
8295
+ case 'database ' :
8296
+ $ this ->openapi ->set ("$ prefix|properties|tables|type " , 'array ' );
8297
+ $ this ->openapi ->set ("$ prefix|properties|tables|items| \$ref " , "#/components/responses/readTable " );
8298
+ break ;
8299
+ case 'table ' :
8300
+ $ this ->openapi ->set ("$ prefix|properties|name|type " , 'string ' );
8301
+ $ this ->openapi ->set ("$ prefix|properties|type|type " , 'string ' );
8302
+ $ this ->openapi ->set ("$ prefix|properties|columns|type " , 'array ' );
8303
+ $ this ->openapi ->set ("$ prefix|properties|columns|items| \$ref " , "#/components/responses/readColumn " );
8304
+ break ;
8305
+ case 'column ' :
8306
+ $ this ->openapi ->set ("$ prefix|properties|name|type " , 'string ' );
8307
+ $ this ->openapi ->set ("$ prefix|properties|type|type " , 'string ' );
8308
+ $ this ->openapi ->set ("$ prefix|properties|length|type " , 'integer ' );
8309
+ $ this ->openapi ->set ("$ prefix|properties|length|format " , "int64 " );
8310
+ $ this ->openapi ->set ("$ prefix|properties|precision|type " , 'integer ' );
8311
+ $ this ->openapi ->set ("$ prefix|properties|precision|format " , "int64 " );
8312
+ $ this ->openapi ->set ("$ prefix|properties|scale|type " , 'integer ' );
8313
+ $ this ->openapi ->set ("$ prefix|properties|scale|format " , "int64 " );
8314
+ $ this ->openapi ->set ("$ prefix|properties|nullable|type " , 'boolean ' );
8315
+ $ this ->openapi ->set ("$ prefix|properties|pk|type " , 'boolean ' );
8316
+ $ this ->openapi ->set ("$ prefix|properties|fk|type " , 'string ' );
8317
+ break ;
8318
+ }
8296
8319
}
8297
8320
}
8298
8321
}
0 commit comments