SwaggerGen/Swagger/Operation.php 1 location
|
@@ 130-140 (lines=11) @@
|
127 |
|
$this->responses[$reasoncode] = $Response; |
128 |
|
return $Response; |
129 |
|
|
130 |
|
case 'require': |
131 |
|
$name = self::wordShift($data); |
132 |
|
if (empty($name)) { |
133 |
|
throw new \SwaggerGen\Exception('Empty security requirement name'); |
134 |
|
} |
135 |
|
$scopes = self::wordSplit($data); |
136 |
|
sort($scopes); |
137 |
|
$this->security[] = array( |
138 |
|
$name => empty($scopes) ? array() : $scopes, |
139 |
|
); |
140 |
|
return $this; |
141 |
|
|
142 |
|
case 'id': |
143 |
|
$operationId = self::trim($data); |
SwaggerGen/Swagger/Swagger.php 1 location
|
@@ 240-250 (lines=11) @@
|
237 |
|
$this->securityDefinitions[$name] = $SecurityScheme; |
238 |
|
return $SecurityScheme; |
239 |
|
|
240 |
|
case 'require': |
241 |
|
$name = self::wordShift($data); |
242 |
|
if (empty($name)) { |
243 |
|
throw new \SwaggerGen\Exception('Missing require name'); |
244 |
|
} |
245 |
|
$scopes = self::wordSplit($data); |
246 |
|
sort($scopes); |
247 |
|
$this->security[] = array( |
248 |
|
$name => empty($scopes) ? array() : $scopes, |
249 |
|
); |
250 |
|
return $this; |
251 |
|
} |
252 |
|
|
253 |
|
return parent::handleCommand($command, $data); |