License.php 856 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php declare(strict_types=1);
  2. /**
  3. * @license Apache 2.0
  4. */
  5. namespace OpenApi\Annotations;
  6. /**
  7. * @Annotation
  8. * License information for the exposed API.
  9. *
  10. * A "License Object": https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#license-object
  11. */
  12. class License extends AbstractAnnotation
  13. {
  14. /**
  15. * The license name used for the API.
  16. *
  17. * @var string
  18. */
  19. public $name = UNDEFINED;
  20. /**
  21. * A URL to the license used for the API.
  22. *
  23. * @var string
  24. */
  25. public $url = UNDEFINED;
  26. /**
  27. * @inheritdoc
  28. */
  29. public static $_types = [
  30. 'name' => 'string',
  31. 'url' => 'string',
  32. ];
  33. /**
  34. * @inheritdoc
  35. */
  36. public static $_required = ['name'];
  37. /**
  38. * @inheritdoc
  39. */
  40. public static $_parents = [
  41. Info::class
  42. ];
  43. }