modelRT/docs/swagger.yaml

118 lines
3.0 KiB
YAML

basePath: /api/v1
definitions:
network.FailureResponse:
properties:
code:
example: 500
type: integer
msg:
example: failed to get recommend data from redis
type: string
payload:
type: object
type: object
network.MeasurementRecommendPayload:
properties:
input:
example: transformfeeder1_220.
type: string
offset:
example: 21
type: integer
recommended_list:
example:
- '["I_A_rms"'
- ' "I_B_rms"'
- '"I_C_rms"]'
items:
type: string
type: array
type: object
network.MeasurementRecommendRequest:
properties:
input:
example: trans
type: string
type: object
network.SuccessResponse:
properties:
code:
example: 200
type: integer
msg:
example: success
type: string
payload:
type: object
type: object
host: localhost:8080
info:
contact:
email: douxu@clea.com.cn
name: douxu
url: http://www.swagger.io/support
description: 实时数据计算和模型运行服务的 API 服务
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: ModelRT 实时模型服务 API 文档
version: "1.0"
paths:
/measurement/recommend:
get:
consumes:
- application/json
description: 根据用户输入的字符串,从 Redis 中查询可能的测量点或结构路径,并提供推荐列表。
parameters:
- description: 查询输入参数,例如 'trans' 或 'transformfeeder1_220.'
in: body
name: request
required: true
schema:
$ref: '#/definitions/network.MeasurementRecommendRequest'
produces:
- application/json
responses:
"200":
description: 返回推荐列表成功
schema:
allOf:
- $ref: '#/definitions/network.SuccessResponse'
- properties:
payload:
$ref: '#/definitions/network.MeasurementRecommendPayload'
type: object
"400":
description: 返回推荐列表失败
schema:
$ref: '#/definitions/network.FailureResponse'
summary: 测量点推荐(搜索框自动补全)
tags:
- Measurement Recommend
/model/diagram_load/{page_id}:
get:
consumes:
- application/json
description: load circuit diagram info by page id
parameters:
- description: page ID
in: path
name: page_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: request process success
schema:
$ref: '#/definitions/network.SuccessResponse'
"400":
description: request process failed
schema:
$ref: '#/definitions/network.FailureResponse'
summary: load circuit diagram info
tags:
- load circuit_diagram
swagger: "2.0"