[Laravel ] swagger UI is showing padlock (authorization btn) on every endpoint there exists.
Description
swagger UI is showing padlock on every endpoint there exists.
Example
api-platform.php
'swagger_ui' => [ 'enabled' => true, 'persist_authorization' => true, 'apiKeys' => [ 'api' => [ 'type' => 'header', 'name' => 'Authorization', ] ] },
ApiResource
`#[ApiResource( operations: [ new Post( uriTemplate: '/login', controller: AuthController::class,
),
],
)]`
in route login swagger show authorization btn (icon padlock) too , How i config in ApiResource route /login to remove padlock .
If it works the same way for Laravel integration as it does for Symfony, you would add the openapi parameter into your operations, setting security to an empty array, e.g.
new Post(
openapi: new Operation(
security: [],
),
...
)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.