Skip to content

Commit 24aa6ba

Browse files
committed
enhance batch data restoring, updat docs
1 parent ee2f07f commit 24aa6ba

File tree

6 files changed

+24
-11
lines changed

6 files changed

+24
-11
lines changed

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
APP_NAME=swis-api
66
APP_ROOT=/opt/${APP_NAME}
7-
APP_VERSION=5.17.9
7+
APP_VERSION=5.18.0
88

99

1010
#
1111
# build constants
1212
#
1313

14-
ALPINE_VERSION=3.19
15-
GOLANG_VERSION=1.22
14+
ALPINE_VERSION=3.20
15+
GOLANG_VERSION=1.23
1616

1717
# note: prod image needs 'tzdata' package present
1818
TZ=Europe/Vienna

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# swis-api (swapi) v5.17
1+
# swis-api (swapi) v5.18
22

33
[![Go Reference](https://pkg.go.dev/badge/go.vxn.dev/swis/v5.svg)](https://pkg.go.dev/go.vxn.dev/swis/v5)
44
[![Go Report Card](https://goreportcard.com/badge/go.vxn.dev/swis/v5)](https://goreportcard.com/report/go.vxn.dev/swis/v5)

api/swagger.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"name": "MIT",
1414
"url": "https://github.com/vxn-dev/swis-api/blob/master/LICENSE"
1515
},
16-
"version": "5.17.9"
16+
"version": "5.18.0"
1717
},
1818
"host": "swis-api-run-prod:8050",
1919
"basePath": "/",
@@ -32,10 +32,7 @@
3232
"200": {
3333
"description": "OK",
3434
"schema": {
35-
"type": "array",
36-
"items": {
37-
"$ref": "#/definitions/pkg_alvax.ConfigRoot"
38-
}
35+
"$ref": "#/definitions/pkg_alvax.ConfigRootMap"
3936
}
4037
}
4138
}
@@ -3973,6 +3970,17 @@
39733970
}
39743971
}
39753972
},
3973+
"pkg_alvax.ConfigRootMap": {
3974+
"type": "object",
3975+
"properties": {
3976+
"items": {
3977+
"type": "object",
3978+
"additionalProperties": {
3979+
"$ref": "#/definitions/pkg_alvax.ConfigRoot"
3980+
}
3981+
}
3982+
}
3983+
},
39763984
"pkg_alvax.Docker": {
39773985
"type": "object",
39783986
"properties": {

cmd/swis-api/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @title swis-api (swapi) v5
2-
// @version 5.17.9
2+
// @version 5.18.0
33
// @description sakalWeb Information System v5 RESTful API documentation
44
// @termsOfService http://swagger.io/terms/
55

@@ -80,6 +80,7 @@ func main() {
8080
// @Success 200
8181
// @Router /ping [get]
8282
// @Router /ping [head]
83+
// @Success 200 {string} "pong"
8384
// Very simple LE support --- https://github.com/gin-gonic/gin#support-lets-encrypt.
8485
router.GET("/ping", func(c *gin.Context) {
8586
c.String(http.StatusOK, "pong")

pkg/alvax/controllers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var restorePackage = &core.RestorePackage{
3535
// @Description get alvax config list
3636
// @Tags alvax
3737
// @Produce json
38-
// @Success 200 {object} []alvax.ConfigRoot
38+
// @Success 200 {object} alvax.ConfigRootMap
3939
// @Router /alvax [get]
4040
func GetConfigs(ctx *gin.Context) {
4141
core.PrintAllRootItems(ctx, Cache, pkgName)

pkg/alvax/models.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package alvax
22

3+
type ConfigRootMap struct {
4+
Items map[string]ConfigRoot `json:"items"`
5+
}
6+
37
type ConfigRoot struct {
48
ID string `json:"id" required:"true" readonly:"true"`
59
Key string `json:"key" required:"true"`

0 commit comments

Comments
 (0)