@@ -8259,13 +8259,13 @@ private function setPath(string $tableName) /*: void*/
8259
8259
$ this ->openapi ->set ("paths| $ path| $ method|parameters| $ p| \$ref " , "#/components/parameters/ $ parameter " );
8260
8260
}
8261
8261
if (in_array ($ operation , ['create ' , 'update ' , 'increment ' ])) {
8262
- $ this ->openapi ->set ("paths| $ path| $ method|requestBody| \$ref " , "#/components/requestBodies/ $ operation- " . urlencode ($ tableName ));
8262
+ $ this ->openapi ->set ("paths| $ path| $ method|requestBody| \$ref " , "#/components/requestBodies/ $ operation- " . rawurlencode ($ tableName ));
8263
8263
}
8264
8264
$ this ->openapi ->set ("paths| $ path| $ method|tags|0 " , "$ tableName " );
8265
8265
$ this ->openapi ->set ("paths| $ path| $ method|description " , "$ operation $ tableName " );
8266
8266
switch ($ operation ) {
8267
8267
case 'list ' :
8268
- $ this ->openapi ->set ("paths| $ path| $ method|responses|200| \$ref " , "#/components/responses/ $ operation- " . urlencode ($ tableName ));
8268
+ $ this ->openapi ->set ("paths| $ path| $ method|responses|200| \$ref " , "#/components/responses/ $ operation- " . rawurlencode ($ tableName ));
8269
8269
break ;
8270
8270
case 'create ' :
8271
8271
if ($ pk ->getType () == 'integer ' ) {
@@ -8275,7 +8275,7 @@ private function setPath(string $tableName) /*: void*/
8275
8275
}
8276
8276
break ;
8277
8277
case 'read ' :
8278
- $ this ->openapi ->set ("paths| $ path| $ method|responses|200| \$ref " , "#/components/responses/ $ operation- " . urlencode ($ tableName ));
8278
+ $ this ->openapi ->set ("paths| $ path| $ method|responses|200| \$ref " , "#/components/responses/ $ operation- " . rawurlencode ($ tableName ));
8279
8279
break ;
8280
8280
case 'update ' :
8281
8281
case 'delete ' :
@@ -8357,7 +8357,7 @@ private function setComponentResponse(string $tableName) /*: void*/
8357
8357
} else {
8358
8358
$ this ->openapi ->set ("components|responses| $ operation- $ tableName|description " , "single $ tableName record " );
8359
8359
}
8360
- $ this ->openapi ->set ("components|responses| $ operation- $ tableName|content|application/json|schema| \$ref " , "#/components/schemas/ $ operation- " . urlencode ($ tableName ));
8360
+ $ this ->openapi ->set ("components|responses| $ operation- $ tableName|content|application/json|schema| \$ref " , "#/components/schemas/ $ operation- " . rawurlencode ($ tableName ));
8361
8361
}
8362
8362
}
8363
8363
@@ -8373,7 +8373,7 @@ private function setComponentRequestBody(string $tableName) /*: void*/
8373
8373
continue ;
8374
8374
}
8375
8375
$ this ->openapi ->set ("components|requestBodies| $ operation- $ tableName|description " , "single $ tableName record " );
8376
- $ this ->openapi ->set ("components|requestBodies| $ operation- $ tableName|content|application/json|schema| \$ref " , "#/components/schemas/ $ operation- " . urlencode ($ tableName ));
8376
+ $ this ->openapi ->set ("components|requestBodies| $ operation- $ tableName|content|application/json|schema| \$ref " , "#/components/schemas/ $ operation- " . rawurlencode ($ tableName ));
8377
8377
}
8378
8378
}
8379
8379
}
@@ -10299,6 +10299,7 @@ public static function toString(ResponseInterface $response): string
10299
10299
'username ' => 'php-crud-api ' ,
10300
10300
'password ' => 'php-crud-api ' ,
10301
10301
'database ' => 'php-crud-api ' ,
10302
+ 'controllers ' => 'openapi,records,columns ' ,
10302
10303
]);
10303
10304
$ request = RequestFactory::fromGlobals ();
10304
10305
$ api = new Api ($ config );
0 commit comments