Selaa lähdekoodia

fix: openapi specs require unique operationId field to be set on each operation

Adnoh 5 vuotta sitten
vanhempi
commit
5eda264a9f
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2
    0
      api.php

+ 2
- 0
api.php Näytä tiedosto

@@ -8322,6 +8322,7 @@ namespace Tqdev\PhpCrudApi\OpenApi {
8322 8322
                         $this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operationType");
8323 8323
                     }
8324 8324
                     $this->openapi->set("paths|$path|$method|tags|0", "$type");
8325
+                    $this->openapi->set("paths|$path|$method|operationId", "$operation"."_"."$type");
8325 8326
                     if ($operationType == 'updateTable') {
8326 8327
                         $this->openapi->set("paths|$path|$method|description", "rename table");
8327 8328
                     } else {
@@ -8630,6 +8631,7 @@ namespace Tqdev\PhpCrudApi\OpenApi {
8630 8631
                     $this->openapi->set("paths|$path|$method|requestBody|\$ref", "#/components/requestBodies/$operation-" . rawurlencode($tableName));
8631 8632
                 }
8632 8633
                 $this->openapi->set("paths|$path|$method|tags|0", "$tableName");
8634
+                $this->openapi->set("paths|$path|$method|operationId", "$operation"."_"."$tableName");
8633 8635
                 $this->openapi->set("paths|$path|$method|description", "$operation $tableName");
8634 8636
                 switch ($operation) {
8635 8637
                     case 'list':

Loading…
Peruuta
Tallenna