From 8c93c8208256097b2f1d18f2395755320b9743ee Mon Sep 17 00:00:00 2001
From: cyBerta <cyberta@riseup.net>
Date: Tue, 3 Dec 2024 01:18:23 +0100
Subject: [PATCH] add generated swagger definition and code

---
 api/docs.go              | 10 ++++++----
 api/swagger.json         | 10 ++++++----
 api/swagger.yaml         |  6 ++++--
 models/models_bridge.go  |  2 +-
 models/models_gateway.go |  2 +-
 5 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/api/docs.go b/api/docs.go
index cf85aca..832bdec 100644
--- a/api/docs.go
+++ b/api/docs.go
@@ -580,9 +580,10 @@ const docTemplate = `{
                     "description": "IPAddr is the IPv4 address",
                     "type": "string"
                 },
-                "lastSeenMillis": {
+                "last_seen_millis": {
                     "description": "LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this bridge",
-                    "type": "integer"
+                    "type": "integer",
+                    "format": "int64"
                 },
                 "load": {
                     "description": "Load is the fractional load - but for now menshen agent is not measuring\nload in the bridges.",
@@ -666,9 +667,10 @@ const docTemplate = `{
                     "description": "IPAddr is the IPv4 address",
                     "type": "string"
                 },
-                "lastSeenMillis": {
+                "last_seen_millis": {
                     "description": "LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this gateway",
-                    "type": "integer"
+                    "type": "integer",
+                    "format": "int64"
                 },
                 "load": {
                     "description": "Load is the fractional load received from the menshen agent. For the\ntime being it is a synthethic metric that takes into account number of clients\nand network information for the node.",
diff --git a/api/swagger.json b/api/swagger.json
index 48f1376..592309c 100644
--- a/api/swagger.json
+++ b/api/swagger.json
@@ -574,9 +574,10 @@
                     "description": "IPAddr is the IPv4 address",
                     "type": "string"
                 },
-                "lastSeenMillis": {
+                "last_seen_millis": {
                     "description": "LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this bridge",
-                    "type": "integer"
+                    "type": "integer",
+                    "format": "int64"
                 },
                 "load": {
                     "description": "Load is the fractional load - but for now menshen agent is not measuring\nload in the bridges.",
@@ -660,9 +661,10 @@
                     "description": "IPAddr is the IPv4 address",
                     "type": "string"
                 },
-                "lastSeenMillis": {
+                "last_seen_millis": {
                     "description": "LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this gateway",
-                    "type": "integer"
+                    "type": "integer",
+                    "format": "int64"
                 },
                 "load": {
                     "description": "Load is the fractional load received from the menshen agent. For the\ntime being it is a synthethic metric that takes into account number of clients\nand network information for the node.",
diff --git a/api/swagger.yaml b/api/swagger.yaml
index 534c75b..875b79a 100644
--- a/api/swagger.yaml
+++ b/api/swagger.yaml
@@ -30,9 +30,10 @@ definitions:
       ip6_addr:
         description: IP6Addr is the IPv6 address
         type: string
-      lastSeenMillis:
+      last_seen_millis:
         description: LastSeenMillis is a unix time in milliseconds representing the
           last time we received a heartbeat update from this bridge
+        format: int64
         type: integer
       load:
         description: |-
@@ -109,9 +110,10 @@ definitions:
       ip6_addr:
         description: IP6Addr is the IPv6 address
         type: string
-      lastSeenMillis:
+      last_seen_millis:
         description: LastSeenMillis is a unix time in milliseconds representing the
           last time we received a heartbeat update from this gateway
+        format: int64
         type: integer
       load:
         description: |-
diff --git a/models/models_bridge.go b/models/models_bridge.go
index d988177..524cecc 100644
--- a/models/models_bridge.go
+++ b/models/models_bridge.go
@@ -43,7 +43,7 @@ type ModelsBridge struct {
 	IPAddr string `json:"ip_addr,omitempty"`
 
 	// LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this bridge
-	LastSeenMillis int64 `json:"lastSeenMillis,omitempty"`
+	LastSeenMillis int64 `json:"last_seen_millis,omitempty"`
 
 	// Load is the fractional load - but for now menshen agent is not measuring
 	// load in the bridges.
diff --git a/models/models_gateway.go b/models/models_gateway.go
index 9490477..7d76b2a 100644
--- a/models/models_gateway.go
+++ b/models/models_gateway.go
@@ -43,7 +43,7 @@ type ModelsGateway struct {
 	IPAddr string `json:"ip_addr,omitempty"`
 
 	// LastSeenMillis is a unix time in milliseconds representing the last time we received a heartbeat update from this gateway
-	LastSeenMillis int64 `json:"lastSeenMillis,omitempty"`
+	LastSeenMillis int64 `json:"last_seen_millis,omitempty"`
 
 	// Load is the fractional load received from the menshen agent. For the
 	// time being it is a synthethic metric that takes into account number of clients
-- 
GitLab