File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/php-symfony Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,15 +90,15 @@ class {{baseName}}Api implements {{classname}} // An interface is autogenerated
9090 /**
9191 * Configure API key authorization: { {{name} }}
9292 */
93- public function set { {name } } ($apiKey)
93+ public function set_api_key_auth ($apiKey)
9494 {
9595 // Retrieve logged in user from $apiKey ...
9696 }
9797 { {/isApiKey} }{ {#isOAuth} }
9898 /**
9999 * Configure OAuth2 access token for authorization: { {{name} }}
100100 */
101- public function set { {name } } ($oauthToken)
101+ public function set_oAuth_auth ($oauthToken)
102102 {
103103 // Retrieve logged in user from $oauthToken ...
104104 }
Original file line number Diff line number Diff line change @@ -36,13 +36,13 @@ interface {{classname}}
3636 {{#authMethods} }
3737
3838 /**
39- * Sets authentication method { {name } }
39+ * Sets authentication method { {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } }
4040 *
41- * @param string $value Value of the { {name } } authentication method.
41+ * @param string $value Value of the { {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } } authentication method.
4242 *
4343 * @return void
4444 */
45- public function set { {name } } ($value);
45+ public function set_ { {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } }_auth ($value);
4646 { {/authMethods} }
4747 { {#operation} }
4848
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class {{controllerName}} extends Controller
8282 { {/returnType} }
8383 // Handle authentication
8484 { {#authMethods} }
85- // Authentication '{ {name } }' required
85+ // Authentication '{ {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } }' required
8686 { {#isApiKey} }
8787 { {#isKeyInHeader} }
8888 // Set key with prefix in header
@@ -168,8 +168,8 @@ class {{controllerName}} extends Controller
168168 $handler = $this -> getApiHandler ();
169169
170170 {{#authMethods} }
171- // Set authentication method '{ {name } }'
172- $handler->set { {name } } ($security{ {name} });
171+ // Set authentication method '{ {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } }'
172+ $handler->set_ { {#isBasic } }basic { {/isBasic } } { {#isApiKey } }api_key { {/isApiKey } } { {#isOAuth } }oAuth { {/isOAuth } }_auth ($security{ {name} });
173173 { {/authMethods} }
174174
175175 // Make the call to the business logic
Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ class {{baseName}}Api implements {{classname}}
4343 /**
4444 * Configure API key authorization: { {{name} }}
4545 */
46- public function set { {name } } ($apiKey)
46+ public function set_api_key_auth ($apiKey)
4747 {
4848 // Retrieve logged in user from $apiKey ...
4949 }
5050{ {/isApiKey} }{ {#isOAuth} }
5151 /**
5252 * Configure OAuth2 access token for authorization: { {{name} }}
5353 */
54- public function set { {name } } ($oauthToken)
54+ public function set_oAuth_auth ($oauthToken)
5555 {
5656 // Retrieve logged in user from $oauthToken ...
5757 }
You can’t perform that action at this time.
0 commit comments