Added some documentation to the API

This commit is contained in:
Jan Böhmer 2023-09-18 12:48:16 +02:00
parent f01ec9dbe4
commit 6387c24c89
4 changed files with 144 additions and 1 deletions

View file

@ -44,7 +44,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
#[UniqueEntity(fields: ['name', 'user'])]
#[ApiResource(
uriTemplate: '/current.{_format}',
uriTemplate: '/tokens/current.{_format}',
description: 'A token used to authenticate API requests.',
operations: [new Get(openapiContext: ['summary' => 'Get information about the API token that is currently used.'])],
normalizationContext: ['groups' => ['token:read', 'api:basic:read'], 'openapi_definition_name' => 'Read'],