openapi: "3.0.0"
info:
  version: 2.0.0
  title: SensLog Analytics
servers:
  - url: http://127.0.0.1:8080
paths:
  /info:
    get:
      operationId: infoGET
      summary: Information about running instance
      tags:
        - Server
      responses:
        200:
          description: Instance information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Info"
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

components:
  schemas:

    Info:
      type: object
      required:
        - name
        - version
        - build
        - uptime
        - uptimeMillis
        - authType
      properties:
        name:
          type: string
        version:
          type: string
        build:
          type: string
        uptimeMillis:
          type: integer
          format: int64
        uptime:
          type: string
        authType:
          type: string
          enum: [BEARER, NONE]
      example:
        name: "senslog-analytics"
        version: "1.1.0"
        build: "123456789"
        uptimeMillis: 1684862333
        uptime: "1:20:00"
        authType: "NONE"

    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
      example:
        code: 404
        message: "Not Found"
