get:
  tags:
    - topics
  summary: get a topic
  description: This operation retrieves a topic's data
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 1
  responses:
    '200':
      description: Topic successfully retrieved
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../components/schemas/Status.yaml#/Status
              response:
                $ref: ../../components/schemas/TopicObject.yaml#/TopicObjectSlim
post:
  tags:
    - topics
  summary: reply to a topic
  description: This operation creates a new reply to an existing topic.
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 2
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            content:
              type: string
              example: This is a test reply
            toPid:
              type: number
          required:
            - content
  responses:
    '200':
      description: post successfully created
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../components/schemas/Status.yaml#/Status
              response:
                allOf:
                  - $ref: ../../components/schemas/PostObject.yaml#/PostObject
                  - type: object
                    properties:
                      index:
                        type: number
delete:
  tags:
    - topics
  summary: delete a topic
  description: This operation purges a topic and all of its posts (careful, there is no confirmation!)
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 3
  responses:
    '200':
      description: Topic successfully purged
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../components/schemas/Status.yaml#/Status
              response:
                type: object
                properties: {}