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