mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-09-09 05:33:54 +00:00
+53
-8
@@ -4,11 +4,11 @@ package docs
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"schemes": [[ marshal .Schemes ]],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"description": "[[escape .Description]]",
|
||||
"title": "[[.Title]]",
|
||||
"termsOfService": "https://github.com/MeshCore-Beacon/beacon-server",
|
||||
"contact": {
|
||||
"name": "MeshCore Beacon",
|
||||
@@ -17,10 +17,10 @@ const docTemplate = `{
|
||||
"license": {
|
||||
"name": "AGPL-3-or-later"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
"version": "[[.Version]]"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"host": "[[.Host]]",
|
||||
"basePath": "[[.BasePath]]",
|
||||
"paths": {
|
||||
"/brokers": {
|
||||
"get": {
|
||||
@@ -291,6 +291,43 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/iatas/{iata}/border": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"IATAs"
|
||||
],
|
||||
"summary": "Get an IATA's GeoJSON border, if configured",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "3-letter IATA code",
|
||||
"name": "iata",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "GeoJSON Feature (Polygon or MultiPolygon geometry, with bbox)",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"204": {
|
||||
"description": "IATA exists but has no border configured"
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api_handlers.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/messages": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -2539,6 +2576,10 @@ const docTemplate = `{
|
||||
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
|
||||
"type": "string"
|
||||
},
|
||||
"stale": {
|
||||
"description": "Stale is true when the node hasn't been seen (last_seen) within the configured\nstaleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).\nApplies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which\nare repeater/room-server only.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"supportsMultibytePaths": {
|
||||
"description": "firmware \u003e= 1.14.0; detected via path hash size",
|
||||
"type": "boolean"
|
||||
@@ -2664,6 +2705,10 @@ const docTemplate = `{
|
||||
"radio": {
|
||||
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
|
||||
"type": "string"
|
||||
},
|
||||
"stale": {
|
||||
"description": "Stale is true when the node hasn't been seen (last_seen) within the configured\nstaleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).\nApplies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which\nare repeater/room-server only.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3774,8 +3819,8 @@ var SwaggerInfo = &swag.Spec{
|
||||
Description: "MeshCore network observation backend. Ingests LoRa packets from MQTT brokers, stores in PostgreSQL, and streams live events via WebSocket.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
LeftDelim: "[[",
|
||||
RightDelim: "]]",
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -289,6 +289,43 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/iatas/{iata}/border": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"IATAs"
|
||||
],
|
||||
"summary": "Get an IATA's GeoJSON border, if configured",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "3-letter IATA code",
|
||||
"name": "iata",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "GeoJSON Feature (Polygon or MultiPolygon geometry, with bbox)",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"204": {
|
||||
"description": "IATA exists but has no border configured"
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api_handlers.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/messages": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -2537,6 +2574,10 @@
|
||||
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
|
||||
"type": "string"
|
||||
},
|
||||
"stale": {
|
||||
"description": "Stale is true when the node hasn't been seen (last_seen) within the configured\nstaleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).\nApplies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which\nare repeater/room-server only.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"supportsMultibytePaths": {
|
||||
"description": "firmware \u003e= 1.14.0; detected via path hash size",
|
||||
"type": "boolean"
|
||||
@@ -2662,6 +2703,10 @@
|
||||
"radio": {
|
||||
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
|
||||
"type": "string"
|
||||
},
|
||||
"stale": {
|
||||
"description": "Stale is true when the node hasn't been seen (last_seen) within the configured\nstaleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).\nApplies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which\nare repeater/room-server only.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -248,6 +248,13 @@ definitions:
|
||||
radio:
|
||||
description: 'shorthand: "freqMhz,bwKhz,sf" e.g. "910.525,62.5,7"'
|
||||
type: string
|
||||
stale:
|
||||
description: |-
|
||||
Stale is true when the node hasn't been seen (last_seen) within the configured
|
||||
staleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).
|
||||
Applies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which
|
||||
are repeater/room-server only.
|
||||
type: boolean
|
||||
supportsMultibytePaths:
|
||||
description: firmware >= 1.14.0; detected via path hash size
|
||||
type: boolean
|
||||
@@ -336,6 +343,13 @@ definitions:
|
||||
radio:
|
||||
description: 'shorthand: "freqMhz,bwKhz,sf" e.g. "910.525,62.5,7"'
|
||||
type: string
|
||||
stale:
|
||||
description: |-
|
||||
Stale is true when the node hasn't been seen (last_seen) within the configured
|
||||
staleness window (default 24h; internal/config.ResolvedConfig.NodeStaleThreshold).
|
||||
Applies to every node type, unlike ClockDriftSeconds/ClockOutOfSync on Node, which
|
||||
are repeater/room-server only.
|
||||
type: boolean
|
||||
type: object
|
||||
github_com_MeshCore-Beacon_beacon-server_internal_api.NodeTypeCount:
|
||||
properties:
|
||||
@@ -1253,6 +1267,30 @@ paths:
|
||||
summary: Get a single IATA code
|
||||
tags:
|
||||
- IATAs
|
||||
/iatas/{iata}/border:
|
||||
get:
|
||||
parameters:
|
||||
- description: 3-letter IATA code
|
||||
in: path
|
||||
name: iata
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: GeoJSON Feature (Polygon or MultiPolygon geometry, with bbox)
|
||||
schema:
|
||||
type: object
|
||||
"204":
|
||||
description: IATA exists but has no border configured
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api_handlers.APIError'
|
||||
summary: Get an IATA's GeoJSON border, if configured
|
||||
tags:
|
||||
- IATAs
|
||||
/messages:
|
||||
get:
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user