Skip to content

Commit 3805515

Browse files
authored
Merge pull request #584 from adnoh/master
Fix for pkName and openapi specs
2 parents 0b2d3c6 + 5eda264 commit 3805515

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8322,6 +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");
83258326
if ($operationType == 'updateTable') {
83268327
$this->openapi->set("paths|$path|$method|description", "rename table");
83278328
} else {
@@ -8616,7 +8617,7 @@ private function setPath(string $tableName) /*: void*/
86168617
$parameters = ['filter', 'include', 'exclude', 'order', 'size', 'page', 'join'];
86178618
}
86188619
} else {
8619-
$path = sprintf('/records/%s/{%s}', $tableName, $pkName);
8620+
$path = sprintf('/records/%s/{%s}', $tableName, 'id'); // $pkName);
86208621
if ($operation == 'read') {
86218622
$parameters = ['pk', 'include', 'exclude', 'join'];
86228623
} else {
@@ -8630,6 +8631,7 @@ private function setPath(string $tableName) /*: void*/
86308631
$this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operation-" . rawurlencode($tableName));
86318632
}
86328633
$this->openapi->set("paths|$path|$method|tags|0", "$tableName");
8634+
$this->openapi->set("paths|$path|$method|operationId", "$operation"."_"."$tableName");
86338635
$this->openapi->set("paths|$path|$method|description", "$operation $tableName");
86348636
switch ($operation) {
86358637
case 'list':

0 commit comments

Comments
 (0)