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

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

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

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

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

      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: Company - Update.
          description: >
            update an item of Company

      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: Company - Delete.
          description: >
            delete an item of Company
