radar_warning/openapi.yaml

85 lines
2.1 KiB
YAML
Raw Permalink 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.

openapi: 3.1.0
info:
title: 雷达预警服务
description: |
提供雷达设置和实时探测预警功能。
## 功能说明
- **雷达配置**: 获取部署在北京的雷达配置信息(经纬度、探测范围)
version: 1.0.0
contact:
name: API Support
servers:
- url: http://localhost:8000
description: 本地开发服务器
paths:
/:
get:
operationId: root
summary: 服务首页
description: 返回服务基本信息和支持的接口列表
responses:
'200':
description: 服务信息
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 雷达预警服务
version:
type: string
example: 1.0.0
endpoints:
type: array
items:
type: string
example:
- /radar/config
/radar/config:
get:
operationId: getRadarConfig
summary: 获取雷达配置
description: |
获取雷达配置信息。雷达部署在北京探测半径2km。
tags:
- 雷达控制
responses:
'200':
description: 雷达配置信息
content:
application/json:
schema:
$ref: '#/components/schemas/RadarConfig'
example:
latitude: 39.9042
longitude: 116.4074
range_km: 2
components:
schemas:
RadarConfig:
type: object
properties:
latitude:
type: number
description: 雷达所在纬度
example: 39.9042
longitude:
type: number
description: 雷达所在经度
example: 116.4074
range_km:
type: number
description: 雷达探测范围(公里)
example: 2
tags:
- name: 雷达控制
description: 雷达配置和控制相关接口