Skip to content

Commit 0f90d17

Browse files
localai-botmudler
andauthored
feat(swagger): update swagger (#9329)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
1 parent ea32b89 commit 0f90d17

3 files changed

Lines changed: 227 additions & 0 deletions

File tree

swagger/docs.go

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,69 @@ const docTemplate = `{
11681168
}
11691169
}
11701170
},
1171+
"/backends/upgrade/{name}": {
1172+
"post": {
1173+
"tags": [
1174+
"backends"
1175+
],
1176+
"summary": "Upgrade a backend",
1177+
"parameters": [
1178+
{
1179+
"type": "string",
1180+
"description": "Backend name",
1181+
"name": "name",
1182+
"in": "path",
1183+
"required": true
1184+
}
1185+
],
1186+
"responses": {
1187+
"200": {
1188+
"description": "Response",
1189+
"schema": {
1190+
"$ref": "#/definitions/schema.BackendResponse"
1191+
}
1192+
}
1193+
}
1194+
}
1195+
},
1196+
"/backends/upgrades": {
1197+
"get": {
1198+
"tags": [
1199+
"backends"
1200+
],
1201+
"summary": "Get available backend upgrades",
1202+
"responses": {
1203+
"200": {
1204+
"description": "Response",
1205+
"schema": {
1206+
"type": "object",
1207+
"additionalProperties": {
1208+
"$ref": "#/definitions/gallery.UpgradeInfo"
1209+
}
1210+
}
1211+
}
1212+
}
1213+
}
1214+
},
1215+
"/backends/upgrades/check": {
1216+
"post": {
1217+
"tags": [
1218+
"backends"
1219+
],
1220+
"summary": "Force backend upgrade check",
1221+
"responses": {
1222+
"200": {
1223+
"description": "Response",
1224+
"schema": {
1225+
"type": "object",
1226+
"additionalProperties": {
1227+
"$ref": "#/definitions/gallery.UpgradeInfo"
1228+
}
1229+
}
1230+
}
1231+
}
1232+
}
1233+
},
11711234
"/metrics": {
11721235
"get": {
11731236
"produces": [
@@ -2258,6 +2321,9 @@ const docTemplate = `{
22582321
"items": {
22592322
"type": "string"
22602323
}
2324+
},
2325+
"version": {
2326+
"type": "string"
22612327
}
22622328
}
22632329
},
@@ -2320,6 +2386,26 @@ const docTemplate = `{
23202386
}
23212387
}
23222388
},
2389+
"gallery.UpgradeInfo": {
2390+
"type": "object",
2391+
"properties": {
2392+
"available_digest": {
2393+
"type": "string"
2394+
},
2395+
"available_version": {
2396+
"type": "string"
2397+
},
2398+
"backend_name": {
2399+
"type": "string"
2400+
},
2401+
"installed_digest": {
2402+
"type": "string"
2403+
},
2404+
"installed_version": {
2405+
"type": "string"
2406+
}
2407+
}
2408+
},
23232409
"galleryop.OpStatus": {
23242410
"type": "object",
23252411
"properties": {

swagger/swagger.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,69 @@
11651165
}
11661166
}
11671167
},
1168+
"/backends/upgrade/{name}": {
1169+
"post": {
1170+
"tags": [
1171+
"backends"
1172+
],
1173+
"summary": "Upgrade a backend",
1174+
"parameters": [
1175+
{
1176+
"type": "string",
1177+
"description": "Backend name",
1178+
"name": "name",
1179+
"in": "path",
1180+
"required": true
1181+
}
1182+
],
1183+
"responses": {
1184+
"200": {
1185+
"description": "Response",
1186+
"schema": {
1187+
"$ref": "#/definitions/schema.BackendResponse"
1188+
}
1189+
}
1190+
}
1191+
}
1192+
},
1193+
"/backends/upgrades": {
1194+
"get": {
1195+
"tags": [
1196+
"backends"
1197+
],
1198+
"summary": "Get available backend upgrades",
1199+
"responses": {
1200+
"200": {
1201+
"description": "Response",
1202+
"schema": {
1203+
"type": "object",
1204+
"additionalProperties": {
1205+
"$ref": "#/definitions/gallery.UpgradeInfo"
1206+
}
1207+
}
1208+
}
1209+
}
1210+
}
1211+
},
1212+
"/backends/upgrades/check": {
1213+
"post": {
1214+
"tags": [
1215+
"backends"
1216+
],
1217+
"summary": "Force backend upgrade check",
1218+
"responses": {
1219+
"200": {
1220+
"description": "Response",
1221+
"schema": {
1222+
"type": "object",
1223+
"additionalProperties": {
1224+
"$ref": "#/definitions/gallery.UpgradeInfo"
1225+
}
1226+
}
1227+
}
1228+
}
1229+
}
1230+
},
11681231
"/metrics": {
11691232
"get": {
11701233
"produces": [
@@ -2255,6 +2318,9 @@
22552318
"items": {
22562319
"type": "string"
22572320
}
2321+
},
2322+
"version": {
2323+
"type": "string"
22582324
}
22592325
}
22602326
},
@@ -2317,6 +2383,26 @@
23172383
}
23182384
}
23192385
},
2386+
"gallery.UpgradeInfo": {
2387+
"type": "object",
2388+
"properties": {
2389+
"available_digest": {
2390+
"type": "string"
2391+
},
2392+
"available_version": {
2393+
"type": "string"
2394+
},
2395+
"backend_name": {
2396+
"type": "string"
2397+
},
2398+
"installed_digest": {
2399+
"type": "string"
2400+
},
2401+
"installed_version": {
2402+
"type": "string"
2403+
}
2404+
}
2405+
},
23202406
"galleryop.OpStatus": {
23212407
"type": "object",
23222408
"properties": {

swagger/swagger.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ definitions:
111111
items:
112112
type: string
113113
type: array
114+
version:
115+
type: string
114116
type: object
115117
gallery.Metadata:
116118
properties:
@@ -155,6 +157,19 @@ definitions:
155157
type: string
156158
type: array
157159
type: object
160+
gallery.UpgradeInfo:
161+
properties:
162+
available_digest:
163+
type: string
164+
available_version:
165+
type: string
166+
backend_name:
167+
type: string
168+
installed_digest:
169+
type: string
170+
installed_version:
171+
type: string
172+
type: object
158173
galleryop.OpStatus:
159174
properties:
160175
cancellable:
@@ -2466,6 +2481,46 @@ paths:
24662481
summary: Returns the job status
24672482
tags:
24682483
- backends
2484+
/backends/upgrade/{name}:
2485+
post:
2486+
parameters:
2487+
- description: Backend name
2488+
in: path
2489+
name: name
2490+
required: true
2491+
type: string
2492+
responses:
2493+
"200":
2494+
description: Response
2495+
schema:
2496+
$ref: '#/definitions/schema.BackendResponse'
2497+
summary: Upgrade a backend
2498+
tags:
2499+
- backends
2500+
/backends/upgrades:
2501+
get:
2502+
responses:
2503+
"200":
2504+
description: Response
2505+
schema:
2506+
additionalProperties:
2507+
$ref: '#/definitions/gallery.UpgradeInfo'
2508+
type: object
2509+
summary: Get available backend upgrades
2510+
tags:
2511+
- backends
2512+
/backends/upgrades/check:
2513+
post:
2514+
responses:
2515+
"200":
2516+
description: Response
2517+
schema:
2518+
additionalProperties:
2519+
$ref: '#/definitions/gallery.UpgradeInfo'
2520+
type: object
2521+
summary: Force backend upgrade check
2522+
tags:
2523+
- backends
24692524
/metrics:
24702525
get:
24712526
produces:

0 commit comments

Comments
 (0)