resources:
  App\Entity\User\Commercial:
    normalizationContext:
      groups:
        - 'identifier:read'
        - 'user:read'
        - 'customer:read'
        - 'commercial:read'
        - 'company_info:read'
        - 'activity_info:read'
        - 'media_file:read'
        - 'time_trace:read'

    denormalizationContext:
      groups:
        - 'user:write'
        - 'company_info:write'
        - 'activity_info:write'
        - 'customer:write'
        - 'commercial:write'
        - 'media_file:write'

    operations:
      ApiPlatform\Metadata\GetCollection:
        filters: [ 'commercial.order_filter', 'commercial.search_filter', 'user.search_filter', 'user.order_filter' ]
        openapiContext:
          security:
            - JWT: [ 'ROLE_INTERNAL' ]
            - ApiKeyAuth: [ 'ROLE_API_KEY' ]
          summary: Commercial - List.
          description: >
            Retrieves a list of Commercial

      ApiPlatform\Metadata\Get:
        openapiContext:
          security:
            - JWT: [ 'ROLE_INTERNAL' ]
            - ApiKeyAuth: [ 'ROLE_API_KEY' ]
          summary: Commercial - Item.
          description: >
            Retrieves a item of Commercial

      ApiPlatform\Metadata\Post:
        inputFormats:
          json: [ 'application/json' ]
          multipart: [ 'multipart/form-data' ]
        openapiContext:
          security:
            - JWT: [ 'ROLE_INTERNAL' ]
            - ApiKeyAuth: [ 'ROLE_API_KEY' ]
          summary: Commercial - Create.
          description: >
            create an item of Commercial

      ApiPlatform\Metadata\Put:
        security: 'is_granted("ROLE_INTERNAL") or is_granted("ROLE_API_KEY")'
        securityMessage: 'You are not authorized to access this resource.'
        inputFormats:
          json: [ 'application/json' ]
          multipart: [ 'multipart/form-data' ]
        openapiContext:
          security:
            - JWT: [ 'ROLE_INTERNAL' ]
            - ApiKeyAuth: [ 'ROLE_API_KEY' ]
          summary: Commercial - Update.
          description: >
            update an item of Commercial

      ApiPlatform\Metadata\Delete:
        security: 'is_granted("ROLE_INTERNAL") or is_granted("ROLE_API_KEY")'
        securityMessage: 'You are not authorized to access this resource.'
        openapiContext:
          security:
            - JWT: [ 'ROLE_INTERNAL' ]
            - ApiKeyAuth: [ 'ROLE_API_KEY' ]
          summary: Commercial - Delete.
          description: >
            delete an item of Commercial
