{
  "openapi": "3.0.2",
  "info": {
    "title": "api/presence",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/presence/state/{code_id}/": {
      "get": {
        "tags": [
          "Users Status"
        ],
        "summary": "Получение статуса пользователя",
        "parameters": [
          {
            "in": "path",
            "name": "code_id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "123.0"
            },
            "description": "id пользователя"
          }
        ],
        "responses": {
          "200": {
            "description": "Список пользователей",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Ошибка авторизации."
          }
        }
      }
    },
    "/presence/state": {
      "post": {
        "tags": [
          "Users Status"
        ],
        "summary": "Возвращает статус для списка пользователей",
        "requestBody": {
          "description": "Список пользователей",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "type": "string",
                  "example": "123456.0"
                },
                "type": "array"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Список пользователей",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatesOfUsers"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Ошибка авторизации."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "User": {
        "type": "object",
        "properties": {
          "code_id": {
            "type": "string",
            "description": "id пользователя",
            "example": "123.0"
          },
          "state": {
            "type": "string",
            "description": "состояние пользователя",
            "example": "offline"
          }
        }
      },
      "StatesOfUsers": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/User"
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}