github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/api/server/register_version.go (about) 1 package server 2 3 import ( 4 "net/http" 5 6 "github.com/containers/podman/v2/pkg/api/handlers/compat" 7 "github.com/gorilla/mux" 8 ) 9 10 func (s *APIServer) registerVersionHandlers(r *mux.Router) error { 11 // swagger:operation GET /version compat CompatSystemVersion 12 // --- 13 // summary: Component Version information 14 // tags: 15 // - system (compat) 16 // produces: 17 // - application/json 18 // responses: 19 // 200: 20 // $ref: "#/responses/Version" 21 r.Handle("/version", s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) 22 r.Handle(VersionedPath("/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) 23 // swagger:operation GET /libpod/version libpod SystemVersion 24 // --- 25 // summary: Component Version information 26 // tags: 27 // - system 28 // produces: 29 // - application/json 30 // responses: 31 // 200: 32 // $ref: "#/responses/Version" 33 r.Handle(VersionedPath("/libpod/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) 34 return nil 35 }