Skip to content

Commit 864243e

Browse files
committed
operationId is now more verbose so that the class and method names can be discerned
1 parent 7dc3bdd commit 864243e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/helpers/Swagger/AnnotationData.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,7 @@ private function constructOperationId()
111111
{
112112
// remove the namespace prefix of the class and make the first letter lowercase
113113
$className = lcfirst(Utils::shortenClass($this->className));
114-
// remove the 'Presenter' suffix
115-
$className = substr($className, 0, strlen($className) - strlen("Presenter"));
116-
117-
// remove the 'action' prefix
118-
$endpoint = substr($this->methodName, strlen("action"));
119-
return $className . $endpoint;
114+
return $className . $this->methodName;
120115
}
121116

122117
/**

app/helpers/Swagger/AnnotationParameterData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ private function generateSchemaAnnotation(): string
9595
return $head . $body->toString();
9696
}
9797

98-
/**
99-
* Converts the object to a @OA\Parameter(...) annotation string
100-
*/
98+
/**
99+
* Converts the object to a @OA\Parameter(...) annotation string
100+
*/
101101
public function toParameterAnnotation(): string
102102
{
103103
$head = "@OA\\Parameter";

0 commit comments

Comments
 (0)