Skip to content

Commit d61af04

Browse files
committed
utf8 in component ids
1 parent 1b14059 commit d61af04

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

api.include.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9740,11 +9740,10 @@ private function setPaths() /*: void*/
97409740
foreach ($this->operations as $type => $operationPair) {
97419741
foreach ($operationPair as $operation => $method) {
97429742
$path = "/$type/$operation";
9743-
$operationType = $operation . ucfirst($type);
97449743
$this->openapi->set("paths|$path|$method|tags|0", "$type");
97459744
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$type");
97469745
$this->openapi->set("paths|$path|$method|description", "Request API '$operation' status");
9747-
$this->openapi->set("paths|$path|$method|responses|200|\$ref", "#/components/responses/$operationType");
9746+
$this->openapi->set("paths|$path|$method|responses|200|\$ref", "#/components/responses/$operation-$type");
97489747

97499748
}
97509749
}
@@ -9754,8 +9753,7 @@ private function setComponentSchema() /*: void*/
97549753
{
97559754
foreach ($this->operations as $type => $operationPair) {
97569755
foreach ($operationPair as $operation => $method) {
9757-
$operationType = $operation . ucfirst($type);
9758-
$prefix = "components|schemas|$operationType";
9756+
$prefix = "components|schemas|$operation-$type";
97599757
$this->openapi->set("$prefix|type", "object");
97609758
switch ($operation) {
97619759
case 'ping':
@@ -9774,9 +9772,8 @@ private function setComponentResponse() /*: void*/
97749772
{
97759773
foreach ($this->operations as $type => $operationPair) {
97769774
foreach ($operationPair as $operation => $method) {
9777-
$operationType = $operation . ucfirst($type);
9778-
$this->openapi->set("components|responses|$operationType|description", "$operation status record");
9779-
$this->openapi->set("components|responses|$operationType|content|application/json|schema|\$ref", "#/components/schemas/$operationType");
9775+
$this->openapi->set("components|responses|$operation-$type|description", "$operation status record");
9776+
$this->openapi->set("components|responses|$operation-$type|content|application/json|schema|\$ref", "#/components/schemas/$operation-$type");
97809777
}
97819778
}
97829779
}

api.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9740,11 +9740,10 @@ private function setPaths() /*: void*/
97409740
foreach ($this->operations as $type => $operationPair) {
97419741
foreach ($operationPair as $operation => $method) {
97429742
$path = "/$type/$operation";
9743-
$operationType = $operation . ucfirst($type);
97449743
$this->openapi->set("paths|$path|$method|tags|0", "$type");
97459744
$this->openapi->set("paths|$path|$method|operationId", "$operation" . "_" . "$type");
97469745
$this->openapi->set("paths|$path|$method|description", "Request API '$operation' status");
9747-
$this->openapi->set("paths|$path|$method|responses|200|\$ref", "#/components/responses/$operationType");
9746+
$this->openapi->set("paths|$path|$method|responses|200|\$ref", "#/components/responses/$operation-$type");
97489747

97499748
}
97509749
}
@@ -9754,8 +9753,7 @@ private function setComponentSchema() /*: void*/
97549753
{
97559754
foreach ($this->operations as $type => $operationPair) {
97569755
foreach ($operationPair as $operation => $method) {
9757-
$operationType = $operation . ucfirst($type);
9758-
$prefix = "components|schemas|$operationType";
9756+
$prefix = "components|schemas|$operation-$type";
97599757
$this->openapi->set("$prefix|type", "object");
97609758
switch ($operation) {
97619759
case 'ping':
@@ -9774,9 +9772,8 @@ private function setComponentResponse() /*: void*/
97749772
{
97759773
foreach ($this->operations as $type => $operationPair) {
97769774
foreach ($operationPair as $operation => $method) {
9777-
$operationType = $operation . ucfirst($type);
9778-
$this->openapi->set("components|responses|$operationType|description", "$operation status record");
9779-
$this->openapi->set("components|responses|$operationType|content|application/json|schema|\$ref", "#/components/schemas/$operationType");
9775+
$this->openapi->set("components|responses|$operation-$type|description", "$operation status record");
9776+
$this->openapi->set("components|responses|$operation-$type|content|application/json|schema|\$ref", "#/components/schemas/$operation-$type");
97809777
}
97819778
}
97829779
}

0 commit comments

Comments
 (0)