|
13 | 13 |
|
14 | 14 | namespace ApiPlatform\OpenApi;
|
15 | 15 |
|
16 |
| -final class Options |
| 16 | +final readonly class Options |
17 | 17 | {
|
18 |
| - public function __construct(private readonly string $title, private readonly string $description = '', private readonly string $version = '', private readonly bool $oAuthEnabled = false, private readonly ?string $oAuthType = null, private readonly ?string $oAuthFlow = null, private readonly ?string $oAuthTokenUrl = null, private readonly ?string $oAuthAuthorizationUrl = null, private readonly ?string $oAuthRefreshUrl = null, private readonly array $oAuthScopes = [], private readonly array $apiKeys = [], private readonly ?string $contactName = null, private readonly ?string $contactUrl = null, private readonly ?string $contactEmail = null, private readonly ?string $termsOfService = null, private readonly ?string $licenseName = null, private readonly ?string $licenseUrl = null, private bool $overrideResponses = true, private readonly array $httpAuth = []) |
19 |
| - { |
| 18 | + public function __construct( |
| 19 | + private string $title, |
| 20 | + private string $description = '', |
| 21 | + private string $version = '', |
| 22 | + private bool $oAuthEnabled = false, |
| 23 | + private ?string $oAuthType = null, |
| 24 | + private ?string $oAuthFlow = null, |
| 25 | + private ?string $oAuthTokenUrl = null, |
| 26 | + private ?string $oAuthAuthorizationUrl = null, |
| 27 | + private ?string $oAuthRefreshUrl = null, |
| 28 | + private array $oAuthScopes = [], |
| 29 | + private array $apiKeys = [], |
| 30 | + private ?string $contactName = null, |
| 31 | + private ?string $contactUrl = null, |
| 32 | + private ?string $contactEmail = null, |
| 33 | + private ?string $termsOfService = null, |
| 34 | + private ?string $licenseName = null, |
| 35 | + private ?string $licenseUrl = null, |
| 36 | + private bool $overrideResponses = true, |
| 37 | + private bool $persistAuthorization = false, |
| 38 | + private array $httpAuth = [], |
| 39 | + ) { |
20 | 40 | }
|
21 | 41 |
|
22 | 42 | public function getTitle(): string
|
@@ -113,4 +133,9 @@ public function getOverrideResponses(): bool
|
113 | 133 | {
|
114 | 134 | return $this->overrideResponses;
|
115 | 135 | }
|
| 136 | + |
| 137 | + public function hasPersistAuthorization(): bool |
| 138 | + { |
| 139 | + return $this->persistAuthorization; |
| 140 | + } |
116 | 141 | }
|
0 commit comments