resources:
  App\Entity\User\Embassy:
    operations:
      ApiPlatform\Metadata\GetCollection:
        filters: [ 'embassy.order_filter', 'embassy.search_filter' , 'user.search_filter', 'user.order_filter' ]
        openapiContext:
          summary: Embassy - List.
          description: >
            Retrieves a list of Embassy
        normalizationContext:
          groups:
            - 'identifier:read'
            - 'time_trace:read'
            - 'user:read'
            - 'customer:read'
            - 'media_file:read'
            - 'embassy:read'
            - 'company_info:read'
            - 'activity_info:read'

      ApiPlatform\Metadata\Get:
        openapiContext:
          summary: Embassy - Item.
          description: >
            Retrieves a item of Embassy
        normalizationContext:
          groups:
            - 'identifier:read'
            - 'time_trace:read'
            - 'user:read'
            - 'customer:read'
            - 'media_file:read'
            - 'embassy:read'
            - 'company_info:read'
            - 'activity_info:read'

      ApiPlatform\Metadata\Post:
        inputFormats:
          json: [ 'application/json' ]
          multipart: [ 'multipart/form-data' ]
        openapiContext:
          summary: Embassy - Create.
          description: >
            create an item of Embassy
        normalizationContext:
          groups:
            - 'identifier:read'
            - 'time_trace:read'
            - 'company_info:read'
            - 'activity_info:read'
            - 'customer:read'
            - 'media_file:read'
            - 'embassy:read'
            - 'user:read'
        denormalizationContext:
          groups:
            - 'user:write'
            - 'company_info:write'
            - 'activity_info:write'
            - 'customer:write'
            - 'embassy:write'
            - 'media_file:write'

      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:
          summary: Embassy - Update.
          description: >
            update an item of Embassy
        normalizationContext:
          groups:
            - 'identifier:read'
            - 'time_trace:read'
            - 'company_info:read'
            - 'activity_info:read'
            - 'customer:read'
            - 'media_file:read'
            - 'embassy:read'
            - 'user:read'
        denormalizationContext:
          groups:
            - 'company_info:write'
            - 'activity_info:write'
            - 'customer:write'
            - 'embassy:write'
            - 'media_file:write'
            - 'user:write'

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