mirror of https://github.com/k3s-io/k3s
Adding version.Info in apiserver.go
parent
a57fd9adfb
commit
1a9f7e9a0c
|
@ -9,7 +9,7 @@
|
||||||
"description": "git code version from which this is built",
|
"description": "git code version from which this is built",
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"type": "void",
|
"type": "version.Info",
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"summary": "get the code version",
|
"summary": "get the code version",
|
||||||
"nickname": "getCodeVersion",
|
"nickname": "getCodeVersion",
|
||||||
|
@ -24,5 +24,49 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"models": {}
|
"models": {
|
||||||
|
"version.Info": {
|
||||||
|
"id": "version.Info",
|
||||||
|
"required": [
|
||||||
|
"major",
|
||||||
|
"minor",
|
||||||
|
"gitVersion",
|
||||||
|
"gitCommit",
|
||||||
|
"gitTreeState",
|
||||||
|
"buildDate",
|
||||||
|
"goVersion",
|
||||||
|
"compiler",
|
||||||
|
"platform"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"major": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"gitVersion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"gitCommit": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"gitTreeState": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"buildDate": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"goVersion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"compiler": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,8 @@ func InstallVersionHandler(mux Mux, container *restful.Container) {
|
||||||
Doc("get the code version").
|
Doc("get the code version").
|
||||||
Operation("getCodeVersion").
|
Operation("getCodeVersion").
|
||||||
Produces(restful.MIME_JSON).
|
Produces(restful.MIME_JSON).
|
||||||
Consumes(restful.MIME_JSON))
|
Consumes(restful.MIME_JSON).
|
||||||
|
Writes(version.Info{}))
|
||||||
|
|
||||||
container.Add(versionWS)
|
container.Add(versionWS)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue