public function jsonSerialize() { if (Swagger::isPrimitive($this->type)) { return parent::jsonSerialize(); } return array('$ref' => $this->type); }
public function jsonSerialize() { $data = parent::jsonSerialize(); if (count($this->responseMessages) === 0) { unset($data['responseMessages']); } if (count($this->parameters) === 0) { unset($data['parameters']); } return $data; }
public function jsonSerialize() { $data = parent::jsonSerialize(); unset($data['description']); if (count($this->models) === 0) { unset($data['models']); } return $data; }
/** * @return array */ public function jsonSerialize() { $data = parent::jsonSerialize($this); $data['properties'] = array(); foreach ($this->properties as $property) { $data['properties'][$property->name] = $property->jsonSerialize(); } return $data; }
/** @inheritdoc */ public function jsonSerialize() { $data = parent::jsonSerialize(); unset($data->method); unset($data->path); return $data; }