vendor/nelmio/api-doc-bundle/Annotation/Model.php line 57

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the NelmioApiDocBundle package.
  4. *
  5. * (c) Nelmio
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Nelmio\ApiDocBundle\Annotation;
  11. use OpenApi\Annotations\Parameter;
  12. use OpenApi\Attributes\Attachable;
  13. use OpenApi\Generator;
  14. /**
  15. * @Annotation
  16. */
  17. #[\Attribute(\Attribute::TARGET_METHOD)]
  18. final class Model extends Attachable
  19. {
  20. /** {@inheritdoc} */
  21. public static $_types = [
  22. 'type' => 'string',
  23. 'groups' => '[string]',
  24. 'options' => '[mixed]',
  25. ];
  26. public static $_required = ['type'];
  27. public static $_parents = [
  28. Parameter::class,
  29. ];
  30. /**
  31. * @var string
  32. */
  33. public $type;
  34. /**
  35. * @var string[]
  36. */
  37. public $groups;
  38. /**
  39. * @var mixed[]
  40. */
  41. public $options;
  42. /**
  43. * @param mixed[] $properties
  44. * @param string[] $groups
  45. * @param mixed[] $options
  46. */
  47. public function __construct(
  48. array $properties = [],
  49. string $type = Generator::UNDEFINED,
  50. array $groups = null,
  51. array $options = null
  52. ) {
  53. parent::__construct($properties + [
  54. 'type' => $type,
  55. 'groups' => $groups,
  56. 'options' => $options,
  57. ]);
  58. }
  59. }