SwaggerGen/Swagger/Operation.php 1 location
|
@@ 121-131 (lines=11) @@
|
| 118 |
|
$this->responses[$reasoncode] = $Response; |
| 119 |
|
return $Response; |
| 120 |
|
|
| 121 |
|
case 'require': |
| 122 |
|
$name = self::wordShift($data); |
| 123 |
|
if (empty($name)) { |
| 124 |
|
throw new \SwaggerGen\Exception('Empty security requirement name'); |
| 125 |
|
} |
| 126 |
|
$scopes = self::wordSplit($data); |
| 127 |
|
sort($scopes); |
| 128 |
|
$this->security[] = array( |
| 129 |
|
$name => empty($scopes) ? array() : $scopes, |
| 130 |
|
); |
| 131 |
|
return $this; |
| 132 |
|
|
| 133 |
|
//@todo operationId |
| 134 |
|
} |
SwaggerGen/Swagger/Swagger.php 1 location
|
@@ 201-211 (lines=11) @@
|
| 198 |
|
$this->securityDefinitions[$name] = $SecurityScheme; |
| 199 |
|
return $SecurityScheme; |
| 200 |
|
|
| 201 |
|
case 'require': |
| 202 |
|
$name = self::wordShift($data); |
| 203 |
|
if (empty($name)) { |
| 204 |
|
throw new \SwaggerGen\Exception('Missing require name'); |
| 205 |
|
} |
| 206 |
|
$scopes = self::wordSplit($data); |
| 207 |
|
sort($scopes); |
| 208 |
|
$this->security[] = array( |
| 209 |
|
$name => empty($scopes) ? array() : $scopes, |
| 210 |
|
); |
| 211 |
|
return $this; |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
return parent::handleCommand($command, $data); |