resources:
  App\Entity\User\User:
    operations:
      get_current_user:
        class: ApiPlatform\Metadata\Get
        security: 'is_granted("ROLE_USER")'
        method: GET
        uriTemplate: /me
        controller: App\Controller\Api\CurrentUserAction
        read: false
        uriVariables: []
        normalizationContext:
          groups: ['user:read', 'media_file:read', 'customer:read', 'time_trace:read', 'identifier:read']
        openapiContext:
          summary: Retrieves the current user resource.
          description: >
            Retrieves the current user resource.
        openapi:
          security:
            -   JWT: ['ROLE_USER']
      impersonate_user:
        class: ApiPlatform\Metadata\Post
        security: 'is_granted("ROLE_ALLOWED_TO_SWITCH")'
        method: POST
        uriTemplate: /impersonate
        controller: App\Controller\Api\ImpersonateUserController
        input: App\Model\User\ImpersonateInput
        output: App\Model\User\LoginOutput
        read: false
        uriVariables: []
        openapiContext:
          summary: Impersonate user.
          description: >
            Impersonate user.
        openapi:
          security:
            -   JWT: ['ROLE_ALLOWED_TO_SWITCH']
      reinitialize_password:
        class: ApiPlatform\Metadata\Post
        method: POST
        uriTemplate: /reinitialize_password
        controller: App\Controller\Api\ReinitializePasswordController
        input: App\Model\User\ReinitializePasswordInput
        read: false
        uriVariables: []
        openapiContext:
          summary: Request an password update.
          description: >
            Request an password update.
      update_password_by_token:
        class: ApiPlatform\Metadata\Post
        method: POST
        uriTemplate: /update_password_token
        controller: App\Controller\Api\UpdatePasswordByTokenController
        input: App\Model\User\UpdatePasswordByTokenInput
        read: false
        uriVariables: []
        openapiContext:
          summary: Update password by token.
          description: >
            Update password by token.
      update_password:
        security: 'is_granted("IS_AUTHENTICATED_FULLY")'
        class: ApiPlatform\Metadata\Post
        method: POST
        uriTemplate: /update_password
        controller: App\Controller\Api\UpdatePasswordController
        input: App\Model\User\UpdatePasswordInput
        read: false
        uriVariables: []
        openapiContext:
          summary: Update password.
          description: >
            Update password.
