Skip to content

Commit e224057

Browse files
committed
merge PR #584
1 parent 3805515 commit e224057

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

api.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8322,7 +8322,7 @@ private function setPaths() /*: void*/
83228322
$this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operationType");
83238323
}
83248324
$this->openapi->set("paths|$path|$method|tags|0", "$type");
8325-
$this->openapi->set("paths|$path|$method|operationId", "$operation"."_"."$type");
8325+
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$type");
83268326
if ($operationType == 'updateTable') {
83278327
$this->openapi->set("paths|$path|$method|description", "rename table");
83288328
} else {
@@ -8617,7 +8617,7 @@ private function setPath(string $tableName) /*: void*/
86178617
$parameters = ['filter', 'include', 'exclude', 'order', 'size', 'page', 'join'];
86188618
}
86198619
} else {
8620-
$path = sprintf('/records/%s/{%s}', $tableName, 'id'); // $pkName);
8620+
$path = sprintf('/records/%s/{id}', $tableName);
86218621
if ($operation == 'read') {
86228622
$parameters = ['pk', 'include', 'exclude', 'join'];
86238623
} else {
@@ -8631,7 +8631,7 @@ private function setPath(string $tableName) /*: void*/
86318631
$this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operation-" . rawurlencode($tableName));
86328632
}
86338633
$this->openapi->set("paths|$path|$method|tags|0", "$tableName");
8634-
$this->openapi->set("paths|$path|$method|operationId", "$operation"."_"."$tableName");
8634+
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$tableName");
86358635
$this->openapi->set("paths|$path|$method|description", "$operation $tableName");
86368636
switch ($operation) {
86378637
case 'list':

src/Tqdev/PhpCrudApi/OpenApi/OpenApiColumnsBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private function setPaths() /*: void*/
7474
$this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operationType");
7575
}
7676
$this->openapi->set("paths|$path|$method|tags|0", "$type");
77+
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$type");
7778
if ($operationType == 'updateTable') {
7879
$this->openapi->set("paths|$path|$method|description", "rename table");
7980
} else {

src/Tqdev/PhpCrudApi/OpenApi/OpenApiRecordsBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function setPath(string $tableName) /*: void*/
129129
$parameters = ['filter', 'include', 'exclude', 'order', 'size', 'page', 'join'];
130130
}
131131
} else {
132-
$path = sprintf('/records/%s/{%s}', $tableName, $pkName);
132+
$path = sprintf('/records/%s/{id}', $tableName);
133133
if ($operation == 'read') {
134134
$parameters = ['pk', 'include', 'exclude', 'join'];
135135
} else {
@@ -143,6 +143,7 @@ private function setPath(string $tableName) /*: void*/
143143
$this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operation-" . rawurlencode($tableName));
144144
}
145145
$this->openapi->set("paths|$path|$method|tags|0", "$tableName");
146+
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$tableName");
146147
$this->openapi->set("paths|$path|$method|description", "$operation $tableName");
147148
switch ($operation) {
148149
case 'list':

0 commit comments

Comments
 (0)