Skip to content

Instantly share code, notes, and snippets.

@Altenrion
Created August 4, 2021 23:14
Show Gist options
  • Save Altenrion/b24dd7e7cd3621d0d6d3bfcb1016d8e9 to your computer and use it in GitHub Desktop.
Save Altenrion/b24dd7e7cd3621d0d6d3bfcb1016d8e9 to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"title": "EASUP API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://virtserver.swaggerhub.com/Altenrion/EASUP/1.0.0",
"description": "SwaggerHub API Auto Mocking"
}
],
"tags": [
{
"name": "developers",
"description": "Operations available to regular developers"
}
],
"paths": {
"/events": {
"get": {
"tags": [
"developers"
],
"summary": "searches for easup events",
"description": "Получение списка записей, с использованием фильтров или без \n",
"operationId": "getEvents",
"parameters": [
{
"name": "date_start",
"in": "query",
"description": "дата начала",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "date_end",
"in": "query",
"description": "дата конца",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "orgstructure",
"in": "query",
"description": "строка для поиска по оргструктуре",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "user_code",
"in": "query",
"description": "строка для поиска по номеру пользователя",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "region",
"in": "query",
"description": "строка для поиска по площадке",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "fio",
"in": "query",
"description": "строка для поиска по ФИО работника",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "show_public",
"in": "query",
"description": "фильтр для отрисовки опубликованных записей",
"required": false,
"style": "form",
"explode": true,
"schema": {
"minimum": 0,
"type": "integer",
"format": "int32"
}
},
{
"name": "show_private",
"in": "query",
"description": "фильтр для отрисовки неопубликованных записей",
"required": false,
"style": "form",
"explode": true,
"schema": {
"minimum": 0,
"type": "integer",
"format": "int32"
}
},
{
"name": "show_only_errors",
"in": "query",
"description": "фильтр для отрисовки только записей с ошибками",
"required": false,
"style": "form",
"explode": true,
"schema": {
"minimum": 0,
"type": "integer",
"format": "int32"
}
},
{
"name": "step",
"in": "query",
"description": "шаг пагинации",
"required": false,
"style": "form",
"explode": true,
"schema": {
"minimum": 0,
"type": "integer",
"format": "int32"
}
},
{
"name": "limit",
"in": "query",
"description": "ограничение кол-ва записей на 1 страницу пагинации",
"required": false,
"style": "form",
"explode": true,
"schema": {
"maximum": 50,
"minimum": 0,
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "search results matching criteria",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WFMList"
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
}
},
"/requests": {
"get": {
"tags": [
"developers"
],
"description": "Получение списка запросов на обновление \n",
"operationId": "getRequests",
"parameters": [
{
"name": "step",
"in": "query",
"description": "шаг пагинации",
"required": false,
"style": "form",
"explode": true,
"schema": {
"minimum": 0,
"type": "integer",
"format": "int32"
}
},
{
"name": "limit",
"in": "query",
"description": "ограничение кол-ва записей на 1 страницу пагинации",
"required": false,
"style": "form",
"explode": true,
"schema": {
"maximum": 50,
"minimum": 0,
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "search results matching criteria",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReCacheRequest"
}
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
},
"post": {
"tags": [
"developers"
],
"description": "Создание запроса на обновление \n",
"operationId": "newRequest",
"requestBody": {
"description": "Создание нового запроса на обновление данных",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReCacheRequestMeta"
}
}
}
},
"responses": {
"201": {
"description": "request created"
},
"400": {
"description": "invalid input, object invalid"
}
}
}
},
"/orgstrusture": {
"get": {
"tags": [
"developers"
],
"description": "Получение списка подразделений по подстроке \n",
"operationId": "getOrgstruct",
"parameters": [
{
"name": "substr",
"in": "query",
"description": "строка поиска",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "результат поиска",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
}
},
"/user_codes": {
"get": {
"tags": [
"developers"
],
"description": "Получение списка номеров сотрудников\n",
"operationId": "getCodes",
"parameters": [
{
"name": "substr",
"in": "query",
"description": "строка поиска",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "результат поиска",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
}
},
"/regions": {
"get": {
"tags": [
"developers"
],
"description": "Получение списка площадок \n",
"operationId": "getRegions",
"parameters": [
{
"name": "substr",
"in": "query",
"description": "строка поиска",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "результат поиска",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
}
},
"/fio": {
"get": {
"tags": [
"developers"
],
"description": "Получение списка ФИО \n",
"operationId": "getFio",
"parameters": [
{
"name": "substr",
"in": "query",
"description": "строка поиска",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "результат поиска",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"400": {
"description": "bad input parameter"
}
}
}
}
},
"components": {
"schemas": {
"WFMList": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WFMRow"
}
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"WFMRow": {
"required": [
"fio"
],
"type": "object",
"properties": {
"fio": {
"type": "string",
"example": "Василенко Петр Семенович"
},
"login": {
"type": "string",
"example": "symenovaa"
},
"user_code": {
"type": "number",
"example": 123123
},
"org_struct": {
"type": "string",
"example": "asdasd / asdasd / asdadsa"
},
"region": {
"type": "string",
"example": "Москва"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WFMCell"
}
}
}
},
"WFMCell": {
"properties": {
"id": {
"type": "number",
"example": 123
},
"value": {
"type": "number",
"format": "float",
"example": 123.23
},
"error": {
"type": "string",
"example": "Слишком много часов для 1 дня"
}
}
},
"ReCacheRequestMeta": {
"properties": {
"fio": {
"type": "string",
"example": "Василенко Петр Семенович"
},
"period": {
"type": "array",
"items": {
"maxLength": 2,
"minLength": 2,
"type": "string",
"format": "date"
}
},
"login": {
"type": "string",
"example": "symenovaa"
}
}
},
"ReCacheRequest": {
"type": "object",
"properties": {
"fio": {
"type": "string",
"example": "Василенко Петр Семенович"
},
"period": {
"type": "array",
"items": {
"maxLength": 2,
"minLength": 2,
"type": "string",
"format": "date"
}
},
"login": {
"type": "string",
"example": "symenovaa"
},
"satus": {
"type": "string"
},
"date_created": {
"type": "string",
"format": "date-time",
"example": "2016-08-29T09:12:33.001Z"
},
"date_updated": {
"type": "string",
"format": "date-time",
"example": "2016-08-29T09:12:33.001Z"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment