summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_swagger.go
blob: 4237540f86c99ee1e10b79abe97ce58be8045dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package server

import (
	"net/http"

	"github.com/containers/podman/v2/pkg/api/handlers/libpod"
	"github.com/gorilla/mux"
)

// RegisterSwaggerHandlers maps the swagger endpoint for the server
func (s *APIServer) RegisterSwaggerHandlers(r *mux.Router) error {
	// This handler does _*NOT*_ provide an UI rather just a swagger spec that an UI could render
	r.HandleFunc(VersionedPath("/libpod/swagger"), s.APIHandler(libpod.ServeSwagger)).Methods(http.MethodGet)
	return nil
}