Example #1
0
 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);
     }
 }
Example #2
0
 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;
 }