public function __construct(array $values = array()) { parent::__construct($values); if ($this->paramType && !in_array($this->paramType, array('path', 'query', 'body', 'header', 'form'))) { Logger::warning('Unexpected paramType "' . $this->paramType . '", expecting "path", "query", "body", "header" or "form" in ' . $this->_context); } }
public function jsonSerialize() { $data = parent::jsonSerialize(); unset($data['name']); unset($data['required']); if ($this->type !== 'array' && Swagger::isPrimitive($this->type) === false) { $data['$ref'] = $this->type; unset($data['type']); } return $data; }