Skip to content

Commit

Permalink
Merge pull request PrestaShop#5 from tleon/add-delete-api-access-endp…
Browse files Browse the repository at this point in the history
…oint

feat(api): add delete api access endpoint
  • Loading branch information
nicosomb authored Oct 31, 2023
2 parents f55c54c + 731b323 commit 112089f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/ApiPlatform/Resources/ApiAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,36 @@
'scopes' => ['api_access_read'],
]
),
new Delete(
uriTemplate: '/api-access/{apiAccessId}',
requirements: ['apiAccessId' => '\d+'],
openapiContext: [
'summary' => 'Delete API Access details',
'description' => 'Delete API Access public details only, sensitive information like secrets is not returned',
'parameters' => [
[
'name' => 'apiAccessId',
'in' => 'path',
'required' => true,
'schema' => [
'type' => 'string',
],
'description' => 'Id of the API Access you are deleting',
],
[
'name' => 'Authorization',
'in' => 'scopes',
'description' => 'api_access_write',
],
],
],
exceptionToStatus: [ApiAccessNotFoundException::class => 404],
provider: CommandProcessor::class,
extraProperties: [
'query' => DeleteApiAccessCommand::class,
'scopes' => ['api_access_write'],
]
),
],
)]
class ApiAccess
Expand Down

0 comments on commit 112089f

Please sign in to comment.