87 lines
2.0 KiB
YAML
87 lines
2.0 KiB
YAML
basePath: /api/isp-lock-service
|
|
definitions:
|
|
domain.ByIdRequest:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
required:
|
|
- id
|
|
type: object
|
|
domain.GrpcError:
|
|
properties:
|
|
details:
|
|
items:
|
|
type: object
|
|
type: array
|
|
errorCode:
|
|
type: string
|
|
errorMessage:
|
|
type: string
|
|
type: object
|
|
domain.Object:
|
|
properties:
|
|
name:
|
|
type: string
|
|
type: object
|
|
host: localhost:9000
|
|
info:
|
|
contact: {}
|
|
description: Шаблон сервиса
|
|
license:
|
|
name: GNU GPL v3.0
|
|
title: isp-lock-service
|
|
version: 1.0.0
|
|
paths:
|
|
/object/all:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Возвращает список объектов
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/domain.Object'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/domain.GrpcError'
|
|
summary: Получить все объекты
|
|
tags:
|
|
- object
|
|
/object/get_by_id:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Возвращает объект
|
|
parameters:
|
|
- description: Идентификатор объекта
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/domain.ByIdRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/domain.Object'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/domain.GrpcError'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/domain.GrpcError'
|
|
summary: Получить объект по его идентификатору
|
|
tags:
|
|
- object
|
|
swagger: "2.0"
|