SwaggerGen/Swagger/Operation.php 1 location
|
@@ 126-136 (lines=11) @@
|
| 123 |
|
$this->responses[$reasoncode] = $Response; |
| 124 |
|
return $Response; |
| 125 |
|
|
| 126 |
|
case 'require': |
| 127 |
|
$name = self::wordShift($data); |
| 128 |
|
if (empty($name)) { |
| 129 |
|
throw new \SwaggerGen\Exception('Empty security requirement name'); |
| 130 |
|
} |
| 131 |
|
$scopes = self::wordSplit($data); |
| 132 |
|
sort($scopes); |
| 133 |
|
$this->security[] = array( |
| 134 |
|
$name => empty($scopes) ? array() : $scopes, |
| 135 |
|
); |
| 136 |
|
return $this; |
| 137 |
|
|
| 138 |
|
//@todo operationId |
| 139 |
|
} |
SwaggerGen/Swagger/Swagger.php 1 location
|
@@ 215-225 (lines=11) @@
|
| 212 |
|
$this->securityDefinitions[$name] = $SecurityScheme; |
| 213 |
|
return $SecurityScheme; |
| 214 |
|
|
| 215 |
|
case 'require': |
| 216 |
|
$name = self::wordShift($data); |
| 217 |
|
if (empty($name)) { |
| 218 |
|
throw new \SwaggerGen\Exception('Missing require name'); |
| 219 |
|
} |
| 220 |
|
$scopes = self::wordSplit($data); |
| 221 |
|
sort($scopes); |
| 222 |
|
$this->security[] = array( |
| 223 |
|
$name => empty($scopes) ? array() : $scopes, |
| 224 |
|
); |
| 225 |
|
return $this; |
| 226 |
|
} |
| 227 |
|
|
| 228 |
|
return parent::handleCommand($command, $data); |