get:
    tags:
        - hs-office-partners
    description: 'Fetch a single business partner by its uuid, if visible for the current subject.'
    operationId: getPartnerByUuid
    parameters:
        - $ref: './auth.yaml#/components/parameters/currentUser'
        - $ref: './auth.yaml#/components/parameters/assumedRoles'
        - name: partnerUUID
          in: path
          required: true
          schema:
              type: string
              format: uuid
          description: UUID of the partner to fetch.
    responses:
        "200":
            description: OK
            content:
                'application/json':
                    schema:
                        $ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartner'

        "401":
            $ref: './error-responses.yaml#/components/responses/Unauthorized'
        "403":
            $ref: './error-responses.yaml#/components/responses/Forbidden'

patch:
    tags:
        - hs-office-partners
    operationId: updatePartner
    parameters:
        -   $ref: './auth.yaml#/components/parameters/currentUser'
        -   $ref: './auth.yaml#/components/parameters/assumedRoles'
        -   name: partnerUUID
            in: path
            required: true
            schema:
                type: string
                format: uuid
    requestBody:
        content:
            'application/json':
                schema:
                    $ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartnerPatch'
    responses:
        "200":
            description: OK
            content:
                'application/json':
                    schema:
                        $ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartner'
        "401":
            $ref: './error-responses.yaml#/components/responses/Unauthorized'
        "403":
            $ref: './error-responses.yaml#/components/responses/Forbidden'

delete:
    tags:
        - hs-office-partners
    description: 'Delete a single business partner by its uuid, if permitted for the current subject.'
    operationId: deletePartnerByUuid
    parameters:
        - $ref: './auth.yaml#/components/parameters/currentUser'
        - $ref: './auth.yaml#/components/parameters/assumedRoles'
        - name: partnerUUID
          in: path
          required: true
          schema:
              type: string
              format: uuid
          description: UUID of the partner to delete.
    responses:
        "204":
            description: No Content
        "401":
            $ref: './error-responses.yaml#/components/responses/Unauthorized'
        "403":
            $ref: './error-responses.yaml#/components/responses/Forbidden'
        "404":
            $ref: './error-responses.yaml#/components/responses/NotFound'