modelRT/docs/swagger.yaml

118 lines
3.0 KiB
YAML
Raw Normal View History

2025-10-20 15:06:23 +08:00
basePath: /api/v1
2024-12-06 16:13:11 +08:00
definitions:
2025-10-20 15:06:23 +08:00
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:
2024-12-06 16:13:11 +08:00
properties:
2025-10-20 15:06:23 +08:00
input:
example: transformfeeder1_220.
2024-12-06 16:13:11 +08:00
type: string
2025-10-20 15:06:23 +08:00
offset:
example: 21
2024-12-06 16:13:11 +08:00
type: integer
2025-10-20 15:06:23 +08:00
recommended_list:
example:
- '["I_A_rms"'
- ' "I_B_rms"'
- '"I_C_rms"]'
2025-10-20 15:06:23 +08:00
items:
type: string
type: array
2024-12-06 16:13:11 +08:00
type: object
2025-10-20 15:06:23 +08:00
network.MeasurementRecommendRequest:
2024-12-06 16:13:11 +08:00
properties:
2025-10-20 15:06:23 +08:00
input:
example: trans
type: string
2024-12-06 16:13:11 +08:00
type: object
network.SuccessResponse:
properties:
2025-10-20 15:06:23 +08:00
code:
example: 200
type: integer
msg:
example: success
type: string
2024-12-06 16:13:11 +08:00
payload:
type: object
type: object
2025-10-20 15:06:23 +08:00
host: localhost:8080
2024-12-06 16:13:11 +08:00
info:
2025-10-20 15:06:23 +08:00
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"
2024-12-06 16:13:11 +08:00
paths:
/measurement/recommend:
get:
2025-10-20 15:06:23 +08:00
consumes:
- application/json
description: 根据用户输入的字符串,从 Redis 中查询可能的测量点或结构路径,并提供推荐列表。
parameters:
- description: 查询输入参数,例如 'trans' 或 'transformfeeder1_220.'
2025-10-20 15:06:23 +08:00
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: 返回推荐列表失败
2025-10-20 15:06:23 +08:00
schema:
$ref: '#/definitions/network.FailureResponse'
summary: 测量点推荐(搜索框自动补全)
tags:
- Measurement Recommend
2024-12-06 16:13:11 +08:00
/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"