Skip to content

Commit abcb34d

Browse files
committed
update swagger files
1 parent b12bc80 commit abcb34d

File tree

3 files changed

+195
-12
lines changed

3 files changed

+195
-12
lines changed

node-registrar/docs/docs.go

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ const docTemplate = `{
779779
}
780780
}
781781
},
782-
"post": {
782+
"put": {
783783
"description": "Sets the ZOS version",
784784
"consumes": [
785785
"application/json"
@@ -1120,7 +1120,18 @@ const docTemplate = `{
11201120
}
11211121
},
11221122
"server.UpdateAccountRequest": {
1123-
"type": "object"
1123+
"type": "object",
1124+
"properties": {
1125+
"relays": {
1126+
"type": "array",
1127+
"items": {
1128+
"type": "string"
1129+
}
1130+
},
1131+
"rmb_enc_key": {
1132+
"type": "string"
1133+
}
1134+
}
11241135
},
11251136
"server.UpdateFarmRequest": {
11261137
"type": "object",
@@ -1173,7 +1184,19 @@ const docTemplate = `{
11731184
}
11741185
},
11751186
"server.UptimeReportRequest": {
1176-
"type": "object"
1187+
"type": "object",
1188+
"required": [
1189+
"timestamp",
1190+
"uptime"
1191+
],
1192+
"properties": {
1193+
"timestamp": {
1194+
"type": "string"
1195+
},
1196+
"uptime": {
1197+
"$ref": "#/definitions/time.Duration"
1198+
}
1199+
}
11771200
},
11781201
"server.ZOSVersionRequest": {
11791202
"type": "object",
@@ -1185,18 +1208,57 @@ const docTemplate = `{
11851208
"type": "string"
11861209
}
11871210
}
1211+
},
1212+
"time.Duration": {
1213+
"type": "integer",
1214+
"enum": [
1215+
-9223372036854775808,
1216+
9223372036854775807,
1217+
1,
1218+
1000,
1219+
1000000,
1220+
1000000000,
1221+
60000000000,
1222+
3600000000000,
1223+
-9223372036854775808,
1224+
9223372036854775807,
1225+
1,
1226+
1000,
1227+
1000000,
1228+
1000000000,
1229+
60000000000,
1230+
3600000000000
1231+
],
1232+
"x-enum-varnames": [
1233+
"minDuration",
1234+
"maxDuration",
1235+
"Nanosecond",
1236+
"Microsecond",
1237+
"Millisecond",
1238+
"Second",
1239+
"Minute",
1240+
"Hour",
1241+
"minDuration",
1242+
"maxDuration",
1243+
"Nanosecond",
1244+
"Microsecond",
1245+
"Millisecond",
1246+
"Second",
1247+
"Minute",
1248+
"Hour"
1249+
]
11881250
}
11891251
}
11901252
}`
11911253

11921254
// SwaggerInfo holds exported Swagger Info so clients can modify it
11931255
var SwaggerInfo = &swag.Spec{
1194-
Version: "",
1256+
Version: "1.0",
11951257
Host: "",
1196-
BasePath: "",
1258+
BasePath: "/v1",
11971259
Schemes: []string{},
1198-
Title: "",
1199-
Description: "",
1260+
Title: "Node Registrar API",
1261+
Description: "API for managing TFGrid node registration",
12001262
InfoInstanceName: "swagger",
12011263
SwaggerTemplate: docTemplate,
12021264
LeftDelim: "{{",

node-registrar/docs/swagger.json

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"contact": {}
4+
"description": "API for managing TFGrid node registration",
5+
"title": "Node Registrar API",
6+
"contact": {},
7+
"version": "1.0"
58
},
9+
"basePath": "/v1",
610
"paths": {
711
"/accounts": {
812
"get": {
@@ -768,7 +772,7 @@
768772
}
769773
}
770774
},
771-
"post": {
775+
"put": {
772776
"description": "Sets the ZOS version",
773777
"consumes": [
774778
"application/json"
@@ -1109,7 +1113,18 @@
11091113
}
11101114
},
11111115
"server.UpdateAccountRequest": {
1112-
"type": "object"
1116+
"type": "object",
1117+
"properties": {
1118+
"relays": {
1119+
"type": "array",
1120+
"items": {
1121+
"type": "string"
1122+
}
1123+
},
1124+
"rmb_enc_key": {
1125+
"type": "string"
1126+
}
1127+
}
11131128
},
11141129
"server.UpdateFarmRequest": {
11151130
"type": "object",
@@ -1162,7 +1177,19 @@
11621177
}
11631178
},
11641179
"server.UptimeReportRequest": {
1165-
"type": "object"
1180+
"type": "object",
1181+
"required": [
1182+
"timestamp",
1183+
"uptime"
1184+
],
1185+
"properties": {
1186+
"timestamp": {
1187+
"type": "string"
1188+
},
1189+
"uptime": {
1190+
"$ref": "#/definitions/time.Duration"
1191+
}
1192+
}
11661193
},
11671194
"server.ZOSVersionRequest": {
11681195
"type": "object",
@@ -1174,6 +1201,45 @@
11741201
"type": "string"
11751202
}
11761203
}
1204+
},
1205+
"time.Duration": {
1206+
"type": "integer",
1207+
"enum": [
1208+
-9223372036854775808,
1209+
9223372036854775807,
1210+
1,
1211+
1000,
1212+
1000000,
1213+
1000000000,
1214+
60000000000,
1215+
3600000000000,
1216+
-9223372036854775808,
1217+
9223372036854775807,
1218+
1,
1219+
1000,
1220+
1000000,
1221+
1000000000,
1222+
60000000000,
1223+
3600000000000
1224+
],
1225+
"x-enum-varnames": [
1226+
"minDuration",
1227+
"maxDuration",
1228+
"Nanosecond",
1229+
"Microsecond",
1230+
"Millisecond",
1231+
"Second",
1232+
"Minute",
1233+
"Hour",
1234+
"minDuration",
1235+
"maxDuration",
1236+
"Nanosecond",
1237+
"Microsecond",
1238+
"Millisecond",
1239+
"Second",
1240+
"Minute",
1241+
"Hour"
1242+
]
11771243
}
11781244
}
11791245
}

node-registrar/docs/swagger.yaml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
basePath: /v1
12
definitions:
23
db.Account:
34
properties:
@@ -189,6 +190,13 @@ definitions:
189190
- twin_id
190191
type: object
191192
server.UpdateAccountRequest:
193+
properties:
194+
relays:
195+
items:
196+
type: string
197+
type: array
198+
rmb_enc_key:
199+
type: string
192200
type: object
193201
server.UpdateFarmRequest:
194202
properties:
@@ -226,6 +234,14 @@ definitions:
226234
- serial_number
227235
type: object
228236
server.UptimeReportRequest:
237+
properties:
238+
timestamp:
239+
type: string
240+
uptime:
241+
$ref: '#/definitions/time.Duration'
242+
required:
243+
- timestamp
244+
- uptime
229245
type: object
230246
server.ZOSVersionRequest:
231247
properties:
@@ -234,8 +250,47 @@ definitions:
234250
required:
235251
- version
236252
type: object
253+
time.Duration:
254+
enum:
255+
- -9223372036854775808
256+
- 9223372036854775807
257+
- 1
258+
- 1000
259+
- 1000000
260+
- 1000000000
261+
- 60000000000
262+
- 3600000000000
263+
- -9223372036854775808
264+
- 9223372036854775807
265+
- 1
266+
- 1000
267+
- 1000000
268+
- 1000000000
269+
- 60000000000
270+
- 3600000000000
271+
type: integer
272+
x-enum-varnames:
273+
- minDuration
274+
- maxDuration
275+
- Nanosecond
276+
- Microsecond
277+
- Millisecond
278+
- Second
279+
- Minute
280+
- Hour
281+
- minDuration
282+
- maxDuration
283+
- Nanosecond
284+
- Microsecond
285+
- Millisecond
286+
- Second
287+
- Minute
288+
- Hour
237289
info:
238290
contact: {}
291+
description: API for managing TFGrid node registration
292+
title: Node Registrar API
293+
version: "1.0"
239294
paths:
240295
/accounts:
241296
get:
@@ -757,7 +812,7 @@ paths:
757812
summary: Get ZOS Version
758813
tags:
759814
- ZOS
760-
post:
815+
put:
761816
consumes:
762817
- application/json
763818
description: Sets the ZOS version

0 commit comments

Comments
 (0)