put:
  summary: Update a comment
  description: Update a given comment based on its id. Only the comment author can update their own comment.
  security:
    - basic_authentication: []
  parameters:
    - in: path
      name: comment_id
      schema:
        type: integer
      required: true
      description: Id of the comment.
      example: 1124
  requestBody:
    description: The new comment body text
    required: true
    content:
      text/plain:
        schema:
          type: string
        example: Updated comment text
  responses:
    '200':
      $ref: '../components/responses/succeeded.yaml'
    '401':
      $ref: '../components/responses/unauthorized.yaml'
    '403':
      description: 'Forbidden'
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          example:
            code: update_comment_not_authorized
            summary: Sorry, you are not authorized to update this comment
    '404':
      description: Not Found
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          example:
            code: not_found
            summary: Couldn't find Comment with id '1124'
  tags:
    - Comments
delete:
  summary: Delete a comment
  description: Delete a given comment based on its id.
  security:
    - basic_authentication: []
  parameters:
    - in: path
      name: comment_id
      schema:
        type: integer
      required: true
      description: Id of the comment.
      example: 1124
  responses:
    '200':
      $ref: '../components/responses/succeeded.yaml'
    '401':
      $ref: '../components/responses/unauthorized.yaml'
    '403':
      description: 'Forbidden'
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          example:
            code: delete_comment_not_authorized
            summary: Sorry, you are not authorized to delete this comment
    '404':
      description: Not Found
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          example:
            code: not_found
            summary: Couldn't find Comment with id '1124'
  tags:
    - Comments
