'string', 'method' => 'string', 'tags' => '[string]', 'summary' => 'string', 'description' => 'string', 'consumes' => '[string]', 'produces' => '[string]', 'schemes' => '[scheme]', 'deprecated' => 'boolean' ]; /** @inheritdoc */ public static $_nested = [ 'Swagger\Annotations\Parameter' => ['parameters'], 'Swagger\Annotations\Response' => ['responses', 'response'], 'Swagger\Annotations\ExternalDocumentation' => 'externalDocs' ]; /** @inheritdoc */ public function jsonSerialize() { $data = parent::jsonSerialize(); unset($data->method); unset($data->path); if (isset($data->operationId) && $data->operationId === null) { unset($data->operationId); } return $data; } public function validate($parents = [], $skip = [], $ref = '') { if (in_array($this, $skip, true)) { return true; } $valid = parent::validate($parents, $skip); if ($this->responses !== null) { foreach ($this->responses as $response) { if ($response->response !== 'default' && preg_match('/^[12345]{1}[0-9]{2}$/', $response->response) === 0) { Logger::notice('Invalid value "' . $response->response . '" for ' . $response->_identity([]) . '->response, expecting "default" or a HTTP Status Code in ' . $response->_context); } } } return $valid; } }