MSP-623 update swagger

This commit is contained in:
DeniskaRediska committed 2022-06-07 10:33:07 +03:00
1 parent 1a90f50218
commit ceeb2f03be
2 files changed
+473 -706

No files matched your search

+272 -420
View File
@@ -1,12 +1,8 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-09-21 17:04:25.146581 +0300 MSK m=+89.051194375
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import (
"github.com/integration-system/isp-lib/v2/docs"
)
import "github.com/integration-system/isp-lib/v2/docs"
var doc = `{
"schemes": {{ marshal .Schemes }},
@@ -83,14 +79,14 @@ var doc = `{
"tags": [
"accessList"
],
"summary": "Настройть доступность списка методов для приложения",
"summary": "Настроить доступность списка методов для приложения",
"parameters": [
{
"description": "объект настройки доступа",
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/domain.SetListRequest"
"$ref": "#/definitions/domain.AccessListSetListRequest"
}
}
],
@@ -121,7 +117,7 @@ var doc = `{
},
"/access_list/set_one": {
"post": {
"description": "Возвращает количество изменных строк",
"description": "Возвращает количество измененных строк",
"consumes": [
"application/json"
],
@@ -138,7 +134,7 @@ var doc = `{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/entity.AccessList"
"$ref": "#/definitions/domain.AccessListSetOneRequest"
}
}
],
@@ -146,7 +142,7 @@ var doc = `{
"200": {
"description": "количество измененных строк",
"schema": {
"$ref": "#/definitions/domain.CountResponse"
"$ref": "#/definitions/domain.AccessListSetOneResponse"
}
},
"404": {
@@ -184,7 +180,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/entity.Application"
"$ref": "#/definitions/domain.ApplicationCreateUpdateRequest"
}
}
],
@@ -192,7 +188,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
},
"400": {
@@ -298,7 +294,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
},
"400": {
@@ -354,7 +350,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
}
},
@@ -369,7 +365,7 @@ var doc = `{
},
"/application/get_applications_by_service_id": {
"post": {
"description": "Возвращает список приложений по запрошенныму идентификатору сервиса",
"description": "Возвращает список приложений по запрошенному идентификатору сервиса",
"consumes": [
"application/json"
],
@@ -382,7 +378,7 @@ var doc = `{
"summary": "Получить список приложений по идентификатору сервиса",
"parameters": [
{
"description": "Идентификатор серсиса",
"description": "Идентификатор сервиса",
"name": "body",
"in": "body",
"required": true,
@@ -397,7 +393,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
}
},
@@ -429,7 +425,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.DomainWithServices"
"$ref": "#/definitions/domain.DomainWithService"
}
}
},
@@ -462,7 +458,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/entity.Domain"
"$ref": "#/definitions/domain.DomainCreateUpdateRequest"
}
}
],
@@ -470,7 +466,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.Domain"
"$ref": "#/definitions/domain.Domain"
}
},
"500": {
@@ -558,7 +554,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.Domain"
"$ref": "#/definitions/domain.Domain"
}
},
"404": {
@@ -605,7 +601,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Domain"
"$ref": "#/definitions/domain.Domain"
}
}
},
@@ -638,7 +634,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/entity.Service"
"$ref": "#/definitions/domain.ServiceCreateUpdateRequest"
}
}
],
@@ -646,7 +642,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.Service"
"$ref": "#/definitions/domain.Service"
}
},
"400": {
@@ -757,7 +753,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Service"
"$ref": "#/definitions/domain.Service"
}
}
},
@@ -798,7 +794,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.Service"
"$ref": "#/definitions/domain.Service"
}
},
"404": {
@@ -846,198 +842,7 @@ var doc = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Service"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
}
}
}
},
"/system/create_update_system": {
"post": {
"description": "Если система с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "Создать/обновить систему",
"parameters": [
{
"description": "Объект системы",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/entity.System"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.System"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
}
}
}
},
"/system/delete_systems": {
"post": {
"description": "Удаляет системы по списку их идентификаторов, возвращает количество удаленных систем",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "Удалить системы",
"parameters": [
{
"description": "Массив идентификаторов систем",
"name": "body",
"in": "body",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.DeleteResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
}
}
}
},
"/system/get_system_by_id": {
"post": {
"description": "Возвращает описание системы по ее идентификатору",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "Получить систему по идентификатору",
"parameters": [
{
"description": "Идентификатор системы",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.Identity"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/entity.System"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/structure.GrpcError"
}
}
}
}
},
"/system/get_systems": {
"post": {
"description": "Возвращает список систем по их идентификаторам",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "Получить список систем",
"parameters": [
{
"description": "Массив идентификаторов систем",
"name": "body",
"in": "body",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.System"
"$ref": "#/definitions/domain.Service"
}
}
},
@@ -1052,7 +857,7 @@ var doc = `{
},
"/token/create_token": {
"post": {
"description": "Созддает токен и привязывает его к приложению",
"description": "Создает токен и привязывает его к приложению",
"consumes": [
"application/json"
],
@@ -1070,7 +875,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.CreateTokenRequest"
"$ref": "#/definitions/domain.TokenCreateRequest"
}
}
],
@@ -1078,7 +883,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
},
"500": {
@@ -1102,7 +907,7 @@ var doc = `{
"tags": [
"token"
],
"summary": "Получить токены по идентификаотру приложения",
"summary": "Получить токены по идентификатору приложения",
"parameters": [
{
"description": "Идентификатор приложения",
@@ -1135,7 +940,7 @@ var doc = `{
},
"/token/revoke_tokens": {
"post": {
"description": "Отвязывает токены от приложений и удялет их",
"description": "Отвязывает токены от приложений и удаляет их",
"consumes": [
"application/json"
],
@@ -1153,7 +958,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.RevokeTokensRequest"
"$ref": "#/definitions/domain.TokenRevokeRequest"
}
}
],
@@ -1161,7 +966,7 @@ var doc = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.AppWithToken"
"$ref": "#/definitions/domain.ApplicationWithTokens"
}
},
"500": {
@@ -1215,30 +1020,7 @@ var doc = `{
}
},
"definitions": {
"domain.AppWithToken": {
"type": "object",
"properties": {
"app": {
"type": "object",
"$ref": "#/definitions/entity.Application"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Token"
}
}
}
},
"domain.CountResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"domain.CreateTokenRequest": {
"domain.AccessListSetListRequest": {
"type": "object",
"required": [
"appId"
@@ -1247,8 +1029,132 @@ var doc = `{
"appId": {
"type": "integer"
},
"expireTimeMs": {
"methods": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.MethodInfo"
}
},
"removeOld": {
"type": "boolean"
}
}
},
"domain.AccessListSetOneRequest": {
"type": "object",
"required": [
"appId",
"method"
],
"properties": {
"appId": {
"type": "integer"
},
"method": {
"type": "string"
},
"value": {
"type": "boolean"
}
}
},
"domain.AccessListSetOneResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"domain.Application": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"serviceId": {
"type": "integer"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"domain.ApplicationCreateUpdateRequest": {
"type": "object",
"required": [
"name",
"serviceId",
"type"
],
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"serviceId": {
"type": "integer"
},
"type": {
"type": "string",
"enum": [
"SYSTEM",
"MOBILE"
]
}
}
},
"domain.ApplicationSimple": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Token"
}
},
"type": {
"type": "string"
}
}
},
"domain.ApplicationWithTokens": {
"type": "object",
"properties": {
"app": {
"$ref": "#/definitions/domain.Application"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.Token"
}
}
}
},
@@ -1260,7 +1166,47 @@ var doc = `{
}
}
},
"domain.DomainWithServices": {
"domain.Domain": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"systemId": {
"type": "integer"
},
"updatedAt": {
"type": "string"
}
}
},
"domain.DomainCreateUpdateRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"domain.DomainWithService": {
"type": "object",
"properties": {
"description": {
@@ -1302,164 +1248,8 @@ var doc = `{
}
}
},
"domain.RevokeTokensRequest": {
"domain.Service": {
"type": "object",
"required": [
"appId"
],
"properties": {
"appId": {
"type": "integer"
},
"tokens": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"domain.ServiceWithApps": {
"type": "object",
"properties": {
"apps": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.SimpleApp"
}
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"domain.SetListRequest": {
"type": "object",
"properties": {
"appId": {
"type": "integer"
},
"methods": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.MethodInfo"
}
},
"removeOld": {
"type": "boolean"
}
}
},
"domain.SimpleApp": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Token"
}
},
"type": {
"type": "string"
}
}
},
"entity.AccessList": {
"type": "object",
"properties": {
"appId": {
"type": "integer"
},
"method": {
"type": "string"
},
"value": {
"type": "boolean"
}
}
},
"entity.Application": {
"type": "object",
"required": [
"name",
"serviceId",
"type"
],
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"serviceId": {
"type": "integer"
},
"type": {
"type": "string",
"enum": [
"SYSTEM",
"MOBILE"
]
},
"updatedAt": {
"type": "string"
}
}
},
"entity.Domain": {
"type": "object",
"required": [
"name"
],
"properties": {
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"systemId": {
"type": "integer"
},
"updatedAt": {
"type": "string"
}
}
},
"entity.Service": {
"type": "object",
"required": [
"domainId",
"name"
],
"properties": {
"createdAt": {
"type": "string"
@@ -1481,15 +1271,36 @@ var doc = `{
}
}
},
"entity.System": {
"domain.ServiceCreateUpdateRequest": {
"type": "object",
"required": [
"domainId",
"name"
],
"properties": {
"createdAt": {
"description": {
"type": "string"
},
"domainId": {
"type": "integer"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"domain.ServiceWithApps": {
"type": "object",
"properties": {
"apps": {
"type": "array",
"items": {
"$ref": "#/definitions/domain.ApplicationSimple"
}
},
"description": {
"type": "string"
},
@@ -1498,18 +1309,59 @@ var doc = `{
},
"name": {
"type": "string"
}
}
},
"domain.Token": {
"type": "object",
"properties": {
"appId": {
"type": "integer"
},
"updatedAt": {
"createdAt": {
"type": "string"
},
"expireTime": {
"type": "integer"
},
"token": {
"type": "string"
}
}
},
"domain.TokenCreateRequest": {
"type": "object",
"required": [
"appId"
],
"properties": {
"appId": {
"type": "integer"
},
"expireTimeMs": {
"type": "integer"
}
}
},
"domain.TokenRevokeRequest": {
"type": "object",
"required": [
"appId"
],
"properties": {
"appId": {
"type": "integer"
},
"tokens": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"entity.Token": {
"type": "object",
"required": [
"appId",
"token"
],
"properties": {
"appId": {
"type": "integer"
@@ -1547,11 +1399,11 @@ var doc = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = docs.SwaggerInfo{
Version: "1.1.2",
Host: "localhost:9003",
Version: "1.0.0",
Host: "localhost:9000",
BasePath: "/api/system",
Schemes: []string{},
Title: "ISP system service",
Title: "isp-system-service",
Description: "Сервис управления реестром внешних приложений и токенами аутентификации",
}
+201 -286
View File
@@ -1,35 +1,128 @@
basePath: /api/system
definitions:
domain.AppWithToken:
domain.AccessListSetListRequest:
properties:
app:
$ref: '#/definitions/entity.Application'
type: object
tokens:
appId:
type: integer
methods:
items:
$ref: '#/definitions/entity.Token'
$ref: '#/definitions/domain.MethodInfo'
type: array
removeOld:
type: boolean
required:
- appId
type: object
domain.CountResponse:
domain.AccessListSetOneRequest:
properties:
appId:
type: integer
method:
type: string
value:
type: boolean
required:
- appId
- method
type: object
domain.AccessListSetOneResponse:
properties:
count:
type: integer
type: object
domain.CreateTokenRequest:
domain.Application:
properties:
appId:
createdAt:
type: string
description:
type: string
id:
type: integer
expireTimeMs:
name:
type: string
serviceId:
type: integer
type:
type: string
updatedAt:
type: string
type: object
domain.ApplicationCreateUpdateRequest:
properties:
description:
type: string
id:
type: integer
name:
type: string
serviceId:
type: integer
type:
enum:
- SYSTEM
- MOBILE
type: string
required:
- appId
- name
- serviceId
- type
type: object
domain.ApplicationSimple:
properties:
description:
type: string
id:
type: integer
name:
type: string
tokens:
items:
$ref: '#/definitions/domain.Token'
type: array
type:
type: string
type: object
domain.ApplicationWithTokens:
properties:
app:
$ref: '#/definitions/domain.Application'
tokens:
items:
$ref: '#/definitions/domain.Token'
type: array
type: object
domain.DeleteResponse:
properties:
deleted:
type: integer
type: object
domain.DomainWithServices:
domain.Domain:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
systemId:
type: integer
updatedAt:
type: string
type: object
domain.DomainCreateUpdateRequest:
properties:
description:
type: string
id:
type: integer
name:
type: string
required:
- name
type: object
domain.DomainWithService:
properties:
description:
type: string
@@ -56,107 +149,7 @@ definitions:
value:
type: boolean
type: object
domain.RevokeTokensRequest:
properties:
appId:
type: integer
tokens:
items:
type: string
type: array
required:
- appId
type: object
domain.ServiceWithApps:
properties:
apps:
items:
$ref: '#/definitions/domain.SimpleApp'
type: array
description:
type: string
id:
type: integer
name:
type: string
type: object
domain.SetListRequest:
properties:
appId:
type: integer
methods:
items:
$ref: '#/definitions/domain.MethodInfo'
type: array
removeOld:
type: boolean
type: object
domain.SimpleApp:
properties:
description:
type: string
id:
type: integer
name:
type: string
tokens:
items:
$ref: '#/definitions/entity.Token'
type: array
type:
type: string
type: object
entity.AccessList:
properties:
appId:
type: integer
method:
type: string
value:
type: boolean
type: object
entity.Application:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
serviceId:
type: integer
type:
enum:
- SYSTEM
- MOBILE
type: string
updatedAt:
type: string
required:
- name
- serviceId
- type
type: object
entity.Domain:
properties:
createdAt:
type: string
description:
type: string
id:
type: integer
name:
type: string
systemId:
type: integer
updatedAt:
type: string
required:
- name
type: object
entity.Service:
domain.Service:
properties:
createdAt:
type: string
@@ -170,24 +163,64 @@ definitions:
type: string
updatedAt:
type: string
type: object
domain.ServiceCreateUpdateRequest:
properties:
description:
type: string
domainId:
type: integer
id:
type: integer
name:
type: string
required:
- domainId
- name
type: object
entity.System:
domain.ServiceWithApps:
properties:
createdAt:
type: string
apps:
items:
$ref: '#/definitions/domain.ApplicationSimple'
type: array
description:
type: string
id:
type: integer
name:
type: string
updatedAt:
type: object
domain.Token:
properties:
appId:
type: integer
createdAt:
type: string
expireTime:
type: integer
token:
type: string
type: object
domain.TokenCreateRequest:
properties:
appId:
type: integer
expireTimeMs:
type: integer
required:
- name
- appId
type: object
domain.TokenRevokeRequest:
properties:
appId:
type: integer
tokens:
items:
type: string
type: array
required:
- appId
type: object
entity.Token:
properties:
@@ -199,9 +232,6 @@ definitions:
type: integer
token:
type: string
required:
- appId
- token
type: object
structure.GrpcError:
properties:
@@ -214,20 +244,21 @@ definitions:
errorMessage:
type: string
type: object
host: localhost:9003
host: localhost:9000
info:
contact: {}
description: Сервис управления реестром внешних приложений и токенами аутентификации
license:
name: GNU GPL v3.0
title: ISP system service
version: 1.1.2
title: isp-system-service
version: 1.0.0
paths:
/access_list/get_by_id:
post:
consumes:
- application/json
description: Возвращает список методов для приложения, для которых заданы настройки доступа
description: Возвращает список методов для приложения, для которых заданы настройки
доступа
parameters:
- description: идентификатор приложения
in: body
@@ -258,13 +289,14 @@ paths:
post:
consumes:
- application/json
description: Возвращает список методов для приложения, для которых заданы настройки доступа
description: Возвращает список методов для приложения, для которых заданы настройки
доступа
parameters:
- description: объект настройки доступа
in: body
name: body
schema:
$ref: '#/definitions/domain.SetListRequest'
$ref: '#/definitions/domain.AccessListSetListRequest'
produces:
- application/json
responses:
@@ -282,27 +314,27 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Настройть доступность списка методов для приложения
summary: Настроить доступность списка методов для приложения
tags:
- accessList
/access_list/set_one:
post:
consumes:
- application/json
description: Возвращает количество изменных строк
description: Возвращает количество измененных строк
parameters:
- description: объект для настройки доступа
in: body
name: body
schema:
$ref: '#/definitions/entity.AccessList'
$ref: '#/definitions/domain.AccessListSetOneRequest'
produces:
- application/json
responses:
"200":
description: количество измененных строк
schema:
$ref: '#/definitions/domain.CountResponse'
$ref: '#/definitions/domain.AccessListSetOneResponse'
"404":
description: Not Found
schema:
@@ -318,21 +350,22 @@ paths:
post:
consumes:
- application/json
description: Если приложение с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу
description: Если приложение с такими идентификатором существует, то обновляет
данные, если нет, то добавляет данные в базу
parameters:
- description: Объект приложения
in: body
name: body
required: true
schema:
$ref: '#/definitions/entity.Application'
$ref: '#/definitions/domain.ApplicationCreateUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
"400":
description: Bad Request
schema:
@@ -356,7 +389,8 @@ paths:
post:
consumes:
- application/json
description: Удаляет приложения по списку их идентификаторов, возвращает количество удаленных приложений
description: Удаляет приложения по списку их идентификаторов, возвращает количество
удаленных приложений
parameters:
- description: Массив идентификаторов приложений
in: body
@@ -401,7 +435,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
"400":
description: Bad Request
schema:
@@ -437,7 +471,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
type: array
"500":
description: Internal Server Error
@@ -450,9 +484,9 @@ paths:
post:
consumes:
- application/json
description: Возвращает список приложений по запрошенныму идентификатору сервиса
description: Возвращает список приложений по запрошенному идентификатору сервиса
parameters:
- description: Идентификатор серсиса
- description: Идентификатор сервиса
in: body
name: body
required: true
@@ -465,7 +499,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
type: array
"500":
description: Internal Server Error
@@ -486,7 +520,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/domain.DomainWithServices'
$ref: '#/definitions/domain.DomainWithService'
type: array
"500":
description: Internal Server Error
@@ -499,21 +533,22 @@ paths:
post:
consumes:
- application/json
description: Если домен с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу
description: Если домен с такими идентификатором существует, то обновляет данные,
если нет, то добавляет данные в базу
parameters:
- description: Объект домена
in: body
name: body
required: true
schema:
$ref: '#/definitions/entity.Domain'
$ref: '#/definitions/domain.DomainCreateUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.Domain'
$ref: '#/definitions/domain.Domain'
"500":
description: Internal Server Error
schema:
@@ -525,7 +560,8 @@ paths:
post:
consumes:
- application/json
description: Удаляет домены по списку их идентификаторов, возвращает количество удаленных доменов
description: Удаляет домены по списку их идентификаторов, возвращает количество
удаленных доменов
parameters:
- description: Массив идентификаторов доменов
in: body
@@ -570,7 +606,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/entity.Domain'
$ref: '#/definitions/domain.Domain'
"404":
description: Not Found
schema:
@@ -600,7 +636,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/entity.Domain'
$ref: '#/definitions/domain.Domain'
type: array
"500":
description: Internal Server Error
@@ -613,21 +649,22 @@ paths:
post:
consumes:
- application/json
description: Если сервис с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу
description: Если сервис с такими идентификатором существует, то обновляет данные,
если нет, то добавляет данные в базу
parameters:
- description: Объект сервиса
in: body
name: body
required: true
schema:
$ref: '#/definitions/entity.Service'
$ref: '#/definitions/domain.ServiceCreateUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.Service'
$ref: '#/definitions/domain.Service'
"400":
description: Bad Request
schema:
@@ -651,7 +688,8 @@ paths:
post:
consumes:
- application/json
description: Удаляет сервисов по списку их идентификаторов, возвращает количество удаленных сервисов
description: Удаляет сервисов по списку их идентификаторов, возвращает количество
удаленных сервисов
parameters:
- description: Массив идентификаторов сервисов
in: body
@@ -699,7 +737,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/entity.Service'
$ref: '#/definitions/domain.Service'
type: array
"500":
description: Internal Server Error
@@ -726,7 +764,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/entity.Service'
$ref: '#/definitions/domain.Service'
"404":
description: Not Found
schema:
@@ -757,7 +795,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/entity.Service'
$ref: '#/definitions/domain.Service'
type: array
"500":
description: Internal Server Error
@@ -766,149 +804,25 @@ paths:
summary: Получить список сервисов по идентификатору домена
tags:
- service
/system/create_update_system:
post:
consumes:
- application/json
description: Если система с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу
parameters:
- description: Объект системы
in: body
name: body
required: true
schema:
$ref: '#/definitions/entity.System'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.System'
"404":
description: Not Found
schema:
$ref: '#/definitions/structure.GrpcError'
"409":
description: Conflict
schema:
$ref: '#/definitions/structure.GrpcError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Создать/обновить систему
tags:
- system
/system/delete_systems:
post:
consumes:
- application/json
description: Удаляет системы по списку их идентификаторов, возвращает количество удаленных систем
parameters:
- description: Массив идентификаторов систем
in: body
name: body
schema:
items:
type: integer
type: array
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.DeleteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/structure.GrpcError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Удалить системы
tags:
- system
/system/get_system_by_id:
post:
consumes:
- application/json
description: Возвращает описание системы по ее идентификатору
parameters:
- description: Идентификатор системы
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.Identity'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.System'
"404":
description: Not Found
schema:
$ref: '#/definitions/structure.GrpcError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Получить систему по идентификатору
tags:
- system
/system/get_systems:
post:
consumes:
- application/json
description: Возвращает список систем по их идентификаторам
parameters:
- description: Массив идентификаторов систем
in: body
name: body
schema:
items:
type: integer
type: array
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/entity.System'
type: array
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Получить список систем
tags:
- system
/token/create_token:
post:
consumes:
- application/json
description: Созддает токен и привязывает его к приложению
description: Создает токен и привязывает его к приложению
parameters:
- description: Объект создания токена
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.CreateTokenRequest'
$ref: '#/definitions/domain.TokenCreateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
"500":
description: Internal Server Error
schema:
@@ -941,28 +855,28 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/structure.GrpcError'
summary: Получить токены по идентификаотру приложения
summary: Получить токены по идентификатору приложения
tags:
- token
/token/revoke_tokens:
post:
consumes:
- application/json
description: Отвязывает токены от приложений и удялет их
description: Отвязывает токены от приложений и удаляет их
parameters:
- description: Объект отзыва токенов
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.RevokeTokensRequest'
$ref: '#/definitions/domain.TokenRevokeRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.AppWithToken'
$ref: '#/definitions/domain.ApplicationWithTokens'
"500":
description: Internal Server Error
schema:
@@ -974,7 +888,8 @@ paths:
post:
consumes:
- application/json
description: Отвязывает токены от приложений и удаляет их по идентификатору приложения
description: Отвязывает токены от приложений и удаляет их по идентификатору
приложения
parameters:
- description: Идентификатор приложения
in: body