dto_generator:
  entities:
    api:
      XCart\API\Entity\Storefront\Cart\Address:
        name: Cart Address
        logicEntity: XCart\Logic\Entity\Storefront\Address
        path: /storefront/carts/{cart_id}/addresses
        register_get_one: true
        register_get_collection: true
        register_create_one: true
        register_update_one: true
        register_delete_one: true
        annotations:
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\InvalidFields: ~
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\RequiredFields: ~
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\CountryStateCompatibility: ~
        fields:
          cartId:
            type: string
            groups: [read]
          isBilling:
            type: bool
            groups: [read, update]
          isShipping:
            type: bool
            groups: [read, update]
          fields:
            type: XCart\API\Entity\Storefront\AddressFieldValue[]
            annotations:
              \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\CountryCode: ~
              \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\StateId: ~

      XCart\API\Entity\Storefront\Address:
        name: User Address
        logicEntity: XCart\Logic\Entity\Storefront\Address
        path: /storefront/users/self/addresses
        register_get_one: true
        register_get_collection: true
        register_create_one: true
        register_update_one: true
        register_delete_one: true
        annotations:
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\InvalidFields: ~
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\RequiredFields: ~
          \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\CountryStateCompatibility: ~
        fields:
          profileId:
            type: integer
            groups: [empty]
          isBilling:
            type: bool
            groups: [read, update]
          isShipping:
            type: bool
            groups: [read, update]
          fields:
            type: XCart\API\Entity\Storefront\AddressFieldValue[]
            annotations:
              \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\CountryCode: ~
              \XCart\API\Endpoint\Storefront\Address\Validator\Constraint\StateId: ~

      XCart\API\Entity\Storefront\AddressField:
        name: Address Field
        logicEntity: XCart\Logic\Entity\Storefront\AddressField
        path: /storefront/address_fields
        register_get_one: true
        register_get_collection: true
        fields:
          serviceName:
            type: string
          label:
            type: string
          required:
            type: bool
          values:
            type: XCart\API\Entity\Storefront\AddressFieldSelectorOption[]
            nullable: true
