openapi: 3.0.3

info:
  title: Swifty Receiver Endpoints
  description: Receiver Endpoints for the P2RX objects
  version: 1.0.0

paths:
  '/async/message':
    post:
      tags:
        - Async
      summary: Post a new message asynchronously
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: 'receiver-models.yaml#/components/schemas/Message'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: 'receiver-models.yaml#/components/schemas/AsynchronousResponse'
          description: Message created successfully
        '400':
          description: Invalid input
      x-openapi-router-controller: swifty_receiver_api.controllers.async_controller
      operationId: create_message
      security:
        - opaque_token:
            - "add_message"

  /version:
    get:
      tags:
        - Version
      summary: Get the api version
      responses:
        '200':
          description: The api version
          content:
            application/json:
              schema:
                $ref: 'receiver-models.yaml#/components/schemas/Version'
        '404':
          description: No version found
      x-openapi-router-controller: swifty_receiver_api.controllers.version_controller
      operationId: get_version
      security: [ ]