@@ -9740,11 +9740,10 @@ private function setPaths() /*: void*/
9740
9740
foreach ($ this ->operations as $ type => $ operationPair ) {
9741
9741
foreach ($ operationPair as $ operation => $ method ) {
9742
9742
$ path = "/ $ type/ $ operation " ;
9743
- $ operationType = $ operation . ucfirst ($ type );
9744
9743
$ this ->openapi ->set ("paths| $ path| $ method|tags|0 " , "$ type " );
9745
9744
$ this ->openapi ->set ("paths| $ path| $ method|operationId " , "$ operation " . "_ " . "$ type " );
9746
9745
$ 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 " );
9748
9747
9749
9748
}
9750
9749
}
@@ -9754,8 +9753,7 @@ private function setComponentSchema() /*: void*/
9754
9753
{
9755
9754
foreach ($ this ->operations as $ type => $ operationPair ) {
9756
9755
foreach ($ operationPair as $ operation => $ method ) {
9757
- $ operationType = $ operation . ucfirst ($ type );
9758
- $ prefix = "components|schemas| $ operationType " ;
9756
+ $ prefix = "components|schemas| $ operation- $ type " ;
9759
9757
$ this ->openapi ->set ("$ prefix|type " , "object " );
9760
9758
switch ($ operation ) {
9761
9759
case 'ping ' :
@@ -9774,9 +9772,8 @@ private function setComponentResponse() /*: void*/
9774
9772
{
9775
9773
foreach ($ this ->operations as $ type => $ operationPair ) {
9776
9774
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 " );
9780
9777
}
9781
9778
}
9782
9779
}
0 commit comments