post:
  summary: Remove a specific flag.
  description: Remove a specific flag for a package.
  security:
    - basic_authentication: []
  parameters:
    - $ref: '../components/parameters/project_name.yaml'
    - $ref: '../components/parameters/package_name.yaml'
    - in: query
      name: flag
      required: true
      schema:
        type: string
        enum:
          - access
          - binarydownload
          - build
          - debuginfo
          - lock
          - publish
          - sourceaccess
          - useforbuild
      description: Name of the flag to be removed.
      example: build
    - in: query
      name: repository
      schema:
        type: string
      description: Repository for which the flag is to be removed.
      example: openSUSE_Tumbleweed
    - in: query
      name: arch
      schema:
        type: string
      description: Architecture for which the flag is to be removed.
      example: x86_64
  responses:
    '200':
      $ref: '../components/responses/succeeded.yaml'
    '400':
      description: |
        Bad Request.

        XML Schema used for body validation: [status.rng](../schema/status.rng)
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          examples:
            Missing Parameter flag:
              value:
                code: missing_parameter
                summary: 'param is missing or the value is empty: flag'
            Invalid flag:
              value:
                code: invalid_flag
                summary: "Error: unknown flag type 'RANDOM_STRING' not found."
    '401':
      $ref: '../components/responses/unauthorized.yaml'
    '403':
      description: Forbidden
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          example:
            code: cmd_execution_no_permission
            summary: no permission to modify package test in project home:Admin
    '404':
      $ref: '../components/responses/unknown_project_or_package.yaml'
  tags:
    - Sources - Packages
