Skip to content

Commit cf8d8d5

Browse files
alexionswing328
authored andcommitted
[PHP] Fix code example from README. Variable name was missing when using Basic auth. (#7777)
1 parent 832919b commit cf8d8d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/swagger-codegen/src/main/resources/php/README.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
6868
require_once(__DIR__ . '/vendor/autoload.php');
6969
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
7070
// Configure HTTP basic authorization: {{{name}}}
71+
$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()
7172
->setUsername('YOUR_USERNAME')
7273
->setPassword('YOUR_PASSWORD');{{/isBasic}}{{#isApiKey}}
7374
// Configure API key authorization: {{{name}}}

0 commit comments

Comments
 (0)