dto_generator:
  entities:
    api:
      XCart\API\Entity\Storefront\User:
        name: User
        logicEntity: XCart\Logic\Entity\Storefront\User
        path: /storefront/users
        register_get_one: true
        register_create_one: true
        register_update_one: true
        register_delete_one: true
        annotations:
          - _: ApiResource
            collectionOperations:
              post:
                method: POST
                path: /storefront/users
                openapi_context:
                  summary: 'Register a new user'
            itemOperations:
              get:
                method: GET
                path: /storefront/users/self
                identifiers: []
                normalization_context:
                  skip_null_values: false
                  groups: ['read']
                openapi_context:
                  summary: 'Retrieve an authenticated user'
              delete:
                method: DELETE
                path: /storefront/users/self
                identifiers: []
                openapi_context:
                  summary: 'Delete an authenticated user'
              patch:
                method: PATCH
                path: /storefront/users/self
                identifiers: []
                openapi_context:
                  summary: 'Partially update an authenticated user'
        fields:
          login:
            type: string
            annotations:
              Assert\Email: ~
          password:
            type: string
            nullable: true
            annotations:
              Assert\Length:
                min: 8
                max: 64
            groups: [insert, update]
          membership:
            type: string
            nullable: true
            groups: [read]
          cartId:
            type: string
            nullable: true
            groups: [read]
