openapi: 3.0.1
info:
  title: services/pubsub_connector/pubsub_service.proto
  version: version not set
tags:
  - name: PubSubService
security:
  - Authorization: []
paths:
  /pubsub/pubsubconnectorservice/publish:
    post:
      operationId: PubSubService_publish
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: string
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pubsub_connectorPublishRequest'
        required: true
      tags:
        - PubSubService
  /pubsub/pubsubconnectorservice/subscribe:
    post:
      operationId: PubSubService_subscribe
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/pubsub_connectorMessage'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of pubsub_connectorMessage
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pubsub_connectorSubscriptionRequest'
        required: true
      tags:
        - PubSubService
components:
  schemas:
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    pubsub_connectorMessage:
      type: object
      properties:
        id:
          type: string
        data:
          type: string
        attributes:
          type: object
          additionalProperties:
            type: string
    pubsub_connectorPublishRequest:
      type: object
      properties:
        topic:
          type: string
        data:
          type: string
        attributes:
          type: object
          additionalProperties:
            type: string
        project:
          type: string
    pubsub_connectorSubscriptionRequest:
      type: object
      properties:
        topic:
          type: string
        group:
          type: string
        filterBy:
          type: string
        filterValue:
          type: string
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
  securitySchemes:
    Authorization:
      type: apiKey
      description: Bearer token
      name: Authorization
      in: header
