dto_generator:
  entities:
    api:
      XCart\API\Entity\Storefront\Principal:
        name: Authentication
        path: /storefront/auth/whoami
        logicEntity: XCart\Logic\Entity\Storefront\Principal
        idType: manual
        annotations:
          - _: ApiResource
            itemOperations:
              whoami:
                method: GET
                path: /storefront/auth/whoami
                identifiers: []
                openapi_context:
                  summary: 'Retrieve user info of an authenticated user'
        fields:
          id:
            id: true
            type: string
            nullable: true
          email:
            type: string
          firstname:
            type: string
            nullable: true
          lastname:
            type: string
            nullable: true
          roles:
            type: string[]

      XCart\API\Entity\Storefront\ResetPasswordAction:
        name: Authentication
        path: /storefront/auth/reset_password
        logicEntity: XCart\Logic\Entity\Storefront\ResetPasswordAction
        fields:
          username:
            type: string
        annotations:
          - _: ApiResource
            collectionOperations:
              resetPassword:
                method: POST
                path: /storefront/auth/reset_password
                status: 204
                openapi_context:
                  summary: Reset password and send new password to the user's e-mail
                  requestBody:
                    content:
                      application/json:
                        schema:
                          type: object
                          properties:
                            username:
                              type: string
                              format: email
                        example:
                          username: test@example.com
                  responses:
                    204:
                      description: New password was sent to the user's e-mail successfully
