diff options
Diffstat (limited to 'pkg/api/server')
-rw-r--r-- | pkg/api/server/register_version.go | 21 | ||||
-rw-r--r-- | pkg/api/server/swagger.go | 9 |
2 files changed, 30 insertions, 0 deletions
diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go index 25cacbc61..30289ffe3 100644 --- a/pkg/api/server/register_version.go +++ b/pkg/api/server/register_version.go @@ -8,7 +8,28 @@ import ( ) func (s *APIServer) registerVersionHandlers(r *mux.Router) error { + // swagger:operation GET /version compat CompatSystemVersion + // --- + // summary: Component Version information + // tags: + // - system (compat) + // produces: + // - application/json + // responses: + // 200: + // $ref: "#/responses/Version" r.Handle("/version", s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) r.Handle(VersionedPath("/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) + // swagger:operation GET /libpod/version libpod SystemVersion + // --- + // summary: Component Version information + // tags: + // - system + // produces: + // - application/json + // responses: + // 200: + // $ref: "#/responses/Version" + r.Handle(VersionedPath("/libpod/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) return nil } diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go index 75dcc71a6..e47f2cc2f 100644 --- a/pkg/api/server/swagger.go +++ b/pkg/api/server/swagger.go @@ -181,3 +181,12 @@ type swagHealthCheckRunResponse struct { define.HealthCheckResults } } + +// Version +// swagger:response Version +type swagVersion struct { + // in:body + Body struct { + entities.SystemVersionReport + } +} |