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); |
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 |
|
|
143 |
|
return parent::handleCommand($command, $data); |