| @@ 121-136 (lines=16) @@ | ||
| 118 | * |
|
| 119 | * @return string[] |
|
| 120 | */ |
|
| 121 | public function getSupportedSchemes($template, $method) |
|
| 122 | { |
|
| 123 | $schemes = $this->fetch( |
|
| 124 | $this->schema, |
|
| 125 | 'paths', |
|
| 126 | $template, |
|
| 127 | $method, |
|
| 128 | 'schemes' |
|
| 129 | ); |
|
| 130 | ||
| 131 | if (!$schemes) { |
|
| 132 | $schemes = $this->fetch($this->schema, 'schemes'); |
|
| 133 | } |
|
| 134 | ||
| 135 | return (array) $schemes; |
|
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * @param string $template |
|
| @@ 194-203 (lines=10) @@ | ||
| 191 | * |
|
| 192 | * @return string[] |
|
| 193 | */ |
|
| 194 | public function getRequestContentTypes($template, $method) |
|
| 195 | { |
|
| 196 | $items = $this->fetch($this->schema, 'paths', $template, $method, 'consumes'); |
|
| 197 | ||
| 198 | if (!$items) { |
|
| 199 | $items = $this->fetch($this->schema, 'consumes'); |
|
| 200 | } |
|
| 201 | ||
| 202 | return (array) $items; |
|
| 203 | } |
|
| 204 | ||
| 205 | /** |
|
| 206 | * @param string $template |
|
| @@ 225-234 (lines=10) @@ | ||
| 222 | * |
|
| 223 | * @return string[] |
|
| 224 | */ |
|
| 225 | public function getResponseContentTypes($template, $method) |
|
| 226 | { |
|
| 227 | $items = $this->fetch($this->schema, 'paths', $template, $method, 'produces'); |
|
| 228 | ||
| 229 | if (!$items) { |
|
| 230 | $items = $this->fetch($this->schema, 'produces'); |
|
| 231 | } |
|
| 232 | ||
| 233 | return (array) $items; |
|
| 234 | } |
|
| 235 | ||
| 236 | /** |
|
| 237 | * @param string $template |
|