Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
 /**
  * @return array
  */
 public function toArray()
 {
     return $this->verbs->toArray();
 }
Exemplo n.º 3
0
 /**
  * @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];
 }
Exemplo n.º 4
0
 /**
  * @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()];
 }