dto_generator:
  entities:
    api:
      XCart\API\Entity\Storefront\Category\Compact:
        name: Category Compact
        logicEntity: XCart\Logic\Entity\Storefront\Category
        path: /storefront/categories/compact
        register_get_one: true
        register_get_collection: true
        itemOperations:
          getByCleanURL:
            method: GET
            path: /storefront/categories/compact/by_clean_url/{clean_url}
            identifiers: [clean_url]
            requirements:
              clean_url: '\S+'
            openapi_context:
              summary: 'Retrieve a category by clean url'
              parameters:
                - in: path
                  name: clean_url
                  schema:
                    type: string
                  required: true
                  description: Full category clean url
                  example: fashion/shoes
        filters:
          - className: XCart\Bundle\APIPlatformBridgeBundle\Filter\IdIntegerFilter
            properties: [parent]
          - className: XCart\Bundle\APIPlatformBridgeBundle\OrderRule\OrderRule
            properties: [pos]
        fields:
          name:
            type: string
          cleanUrl:
            type: string
            nullable: true
          showTitle:
            type: bool
          icon:
            type: XCart\API\Entity\Storefront\Image
            nullable: true
          banner:
            type: XCart\API\Entity\Storefront\Image
            nullable: true
          path:
            type: XCart\API\Entity\Storefront\Category\PathElement[]
          hasSubcategories:
            type: bool

      XCart\API\Entity\Storefront\Category\Detailed:
        name: Category Detailed
        logicEntity: XCart\Logic\Entity\Storefront\Category
        path: /storefront/categories/detailed
        register_get_one: true
        register_get_collection: true
        itemOperations:
          getByCleanURL:
            method: GET
            path: /storefront/categories/detailed/by_clean_url/{clean_url}
            identifiers: [clean_url]
            requirements:
              clean_url: '\S+'
            openapi_context:
              summary: 'Retrieve a category by clean url'
              parameters:
                - in: path
                  name: clean_url
                  schema:
                    type: string
                  required: true
                  description: Full category clean url
                  example: fashion/shoes

        filters:
          - className: XCart\Bundle\APIPlatformBridgeBundle\Filter\IdIntegerFilter
            properties: [parent]
          - className: XCart\Bundle\APIPlatformBridgeBundle\OrderRule\OrderRule
            properties: [pos]
        fields:
          name:
            type: string
          description:
            type: string
          cleanUrl:
            type: string
            nullable: true
          showTitle:
            type: bool
          banner:
            type: XCart\API\Entity\Storefront\Image
            nullable: true
          metaTags:
            type: string
            nullable: true
          metaDescription:
            type: string
            nullable: true
          metaTitle:
            type: string
          path:
            type: XCart\API\Entity\Storefront\Category\PathElement[]
          hasSubcategories:
            type: bool
