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",
|
||||
"operations": [
|
||||
{
|
||||
"type": "void",
|
||||
"type": "version.Info",
|
||||
"method": "GET",
|
||||
"summary": "get the code version",
|
||||
"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").
|
||||
Operation("getCodeVersion").
|
||||
Produces(restful.MIME_JSON).
|
||||
Consumes(restful.MIME_JSON))
|
||||
Consumes(restful.MIME_JSON).
|
||||
Writes(version.Info{}))
|
||||
|
||||
container.Add(versionWS)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue