/** * @return array */ public function toArray() { $array = parent::toArray(); $array['properties'] = $this->properties->toArray(); unset($array['name']); if (empty($array['properties'])) { $array['properties'] = new \stdClass(); } return $array; }
/** * @return array */ public function toArray() { return $this->verbs->toArray(); }
/** * @return array */ public function toArray() { return ['description' => $this->description, 'parameters' => array_values($this->parameters->toArray()), 'tags' => $this->tags->toString(), 'produces' => $this->produces, 'responses' => $this->responses]; }
/** * @return array */ public function getDocument() { return ["swagger" => "2.0", "info" => ["version" => $this->module->apiVersion, "title" => Yii::$app->name, "description" => $this->module->description], "host" => $this->module->host, "basePath" => $this->module->basePath, "schemes" => $this->module->schemes, "consumes" => $this->module->consumes, "produces" => $this->module->produces, 'tags' => array_values($this->tags->toArray()), 'paths' => $this->paths->toArray(), 'definitions' => $this->definitions->toArray()]; }