Esempio n. 1
0
 /**
  * @param DescriptionBuilder $builder
  * @return array
  */
 public function toSwagger(DescriptionBuilder $builder)
 {
     $out = parent::toSwagger($builder);
     unset($out['type']);
     $resourceDefinition = ResourceDefinitionLibrary::make($this->resourceDefinition);
     $context = Method::toAction($this->route->getMethod(), $this->cardinality);
     $out['schema'] = ['$ref' => $builder->addResourceDefinition($resourceDefinition, $context, $this->cardinality)];
     return $out;
 }
Esempio n. 2
0
 /**
  * PathParameter constructor.
  * @param string $name
  */
 public function __construct(string $name)
 {
     parent::__construct($name, self::IN_PATH);
 }
Esempio n. 3
0
 /**
  * @param DescriptionBuilder $builder
  * @return array
  */
 public function toSwagger(DescriptionBuilder $builder)
 {
     $out = parent::toSwagger($builder);
     return $out;
 }