modelRT/docs/swagger.yaml

117 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

basePath: /api/v1
definitions:
network.FailureResponse:
properties:
code:
example: 500
type: integer
msg:
example: failed to get recommend data from redis
type: string
payload:
additionalProperties:
type: string
example:
key: value
type: object
type: object
network.MeasurementRecommendPayload:
properties:
input:
example: transformfeeder1_220.
type: string
offset:
example: 20
type: integer
recommended_list:
example:
- '["I_A_rms"'
- ' "I_B_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:
additionalProperties:
type: string
example:
key: value
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:
/api/v1/recommend/measurement:
post:
consumes:
- application/json
description: 根据用户输入的字符串,从 Redis 中查询可能的测量点或结构路径,并提供推荐列表。
parameters:
- description: 查询输入参数,例如 'trans' 或 'grid_key.'
in: body
name: request
required: true
schema:
$ref: '#/definitions/network.MeasurementRecommendRequest'
produces:
- application/json
responses:
"200":
description: 请求或查询失败。**注意**HTTP 状态码始终为 200但内部 Code 为 400 (参数错误) 或 500
(内部错误)。
schema:
$ref: '#/definitions/network.FailureResponse'
summary: 测量点推荐(搜索框自动补全)
tags:
- 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"