| @@ 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 |
|
| @@ 205-214 (lines=10) @@ | ||
| 202 | * |
|
| 203 | * @return string[] |
|
| 204 | */ |
|
| 205 | public function getRequestContentTypes($template, $method) |
|
| 206 | { |
|
| 207 | $items = $this->fetch($this->schema, 'paths', $template, $method, 'consumes'); |
|
| 208 | ||
| 209 | if (!$items) { |
|
| 210 | $items = $this->fetch($this->schema, 'consumes'); |
|
| 211 | } |
|
| 212 | ||
| 213 | return (array) $items; |
|
| 214 | } |
|
| 215 | ||
| 216 | /** |
|
| 217 | * @param string $template |
|
| @@ 236-245 (lines=10) @@ | ||
| 233 | * |
|
| 234 | * @return string[] |
|
| 235 | */ |
|
| 236 | public function getResponseContentTypes($template, $method) |
|
| 237 | { |
|
| 238 | $items = $this->fetch($this->schema, 'paths', $template, $method, 'produces'); |
|
| 239 | ||
| 240 | if (!$items) { |
|
| 241 | $items = $this->fetch($this->schema, 'produces'); |
|
| 242 | } |
|
| 243 | ||
| 244 | return (array) $items; |
|
| 245 | } |
|
| 246 | ||
| 247 | /** |
|
| 248 | * @param string $template |
|