summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2022-05-19 10:27:31 -0700
committerJhon Honce <jhonce@redhat.com>2022-05-19 15:24:18 -0700
commit5b79cf15a0226dc3dad5053615ee652823376cd3 (patch)
tree066e0b6e5fde4af49e7113ab48c277a55a60c22a /pkg/api/server
parent913caaa9b1de2b63692c9bae15120208194c9eb3 (diff)
downloadpodman-5b79cf15a0226dc3dad5053615ee652823376cd3.tar.gz
podman-5b79cf15a0226dc3dad5053615ee652823376cd3.tar.bz2
podman-5b79cf15a0226dc3dad5053615ee652823376cd3.zip
Swagger refactor/cleanup
* Remove duplicate or unused types and constants * Move all documetation-only models and responses into swagger package * Remove all unecessary names, go-swagger will determine names from struct declarations * Use Libpod suffix to differentiate between compat and libpod models and responses. Taken from swagger:operation declarations. * Models and responses that start with lowercase are for swagger use only while uppercase are used "as is" in the code and swagger comments * Used gofumpt on new code ```release-note ``` Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/doc.go (renamed from pkg/api/server/docs.go)24
-rw-r--r--pkg/api/server/register_archive.go24
-rw-r--r--pkg/api/server/register_auth.go4
-rw-r--r--pkg/api/server/register_containers.go254
-rw-r--r--pkg/api/server/register_events.go4
-rw-r--r--pkg/api/server/register_exec.go34
-rw-r--r--pkg/api/server/register_generate.go7
-rw-r--r--pkg/api/server/register_healthcheck.go6
-rw-r--r--pkg/api/server/register_images.go172
-rw-r--r--pkg/api/server/register_info.go6
-rw-r--r--pkg/api/server/register_manifest.go52
-rw-r--r--pkg/api/server/register_networks.go80
-rw-r--r--pkg/api/server/register_ping.go2
-rw-r--r--pkg/api/server/register_play.go8
-rw-r--r--pkg/api/server/register_pods.go104
-rw-r--r--pkg/api/server/register_secrets.go16
-rw-r--r--pkg/api/server/register_system.go14
-rw-r--r--pkg/api/server/register_version.go4
-rw-r--r--pkg/api/server/register_volumes.go64
-rw-r--r--pkg/api/server/server.go8
-rw-r--r--pkg/api/server/swagger.go246
21 files changed, 444 insertions, 689 deletions
diff --git a/pkg/api/server/docs.go b/pkg/api/server/doc.go
index 2127e7d82..0bb10a19c 100644
--- a/pkg/api/server/docs.go
+++ b/pkg/api/server/doc.go
@@ -1,10 +1,7 @@
-// Package api Provides an API for the Libpod library
+// Package server supports a RESTful API for the Libpod library
//
-// This documentation describes the Podman v2.0 RESTful API.
-// It replaces the Podman v1.0 API and was initially delivered
-// along with Podman v2.0. It consists of a Docker-compatible
-// API and a Libpod API providing support for Podman’s unique
-// features such as pods.
+// This documentation describes the Podman v2.x+ RESTful API. It consists of a Docker-compatible
+// API and a Libpod API providing support for Podman’s unique features such as pods.
//
// To start the service and keep it running for 5,000 seconds (-t 0 runs forever):
//
@@ -15,11 +12,11 @@
// NOTE: if you install the package podman-docker, it will create a symbolic
// link for /run/docker.sock to /run/podman/podman.sock
//
-// NOTE: some fields in the API response JSON are set as omitempty, which means that
-// if there is no value set for them, they will not show up in the API response. This
+// NOTE: Some fields in the API response JSON are encoded as omitempty, which means that
+// if said field has a zero value, they will not be encoded in the API response. This
// is a feature to help reduce the size of the JSON responses returned via the API.
//
-// NOTE: due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger),
+// NOTE: Due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger),
// some field values that have a complex type show up as null in the docs as well as in the
// API responses. This is because the zero value for the field type is null. The field
// description in the docs will state what type the field is expected to be for such cases.
@@ -30,18 +27,20 @@
//
// 'podman info'
//
-// curl --unix-socket /run/podman/podman.sock http://d/v3.0.0/libpod/info
+// curl --unix-socket /run/podman/podman.sock http://d/v4.0.0/libpod/info
//
// 'podman pull quay.io/containers/podman'
//
-// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman'
+// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v4.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman'
//
// 'podman list images'
//
-// curl --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/libpod/images/json' | jq
+// curl --unix-socket /run/podman/podman.sock -v 'http://d/v4.0.0/libpod/images/json' | jq
//
// Terms Of Service:
//
+// https://github.com/containers/podman/blob/913caaa9b1de2b63692c9bae15120208194c9eb3/LICENSE
+//
// Schemes: http, https
// Host: podman.io
// BasePath: /
@@ -62,5 +61,6 @@
// Consumes:
// - application/json
// - application/x-tar
+//
// swagger:meta
package server
diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go
index e51d12300..10131c7f2 100644
--- a/pkg/api/server/register_archive.go
+++ b/pkg/api/server/register_archive.go
@@ -44,13 +44,13 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// 200:
// description: no error
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 403:
// description: the container rootfs is read-only
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
// swagger:operation GET /containers/{name}/archive compat ContainerArchive
// ---
@@ -78,11 +78,11 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// type: string
// format: binary
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/archive"), s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPut, http.MethodHead)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/archive", s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPut, http.MethodHead)
@@ -124,13 +124,13 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// 200:
// description: no error
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 403:
// description: the container rootfs is read-only
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
// swagger:operation GET /libpod/containers/{name}/archive libpod ContainerArchiveLibpod
// ---
@@ -162,11 +162,11 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// type: string
// format: binary
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/archive"), s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPut, http.MethodHead)
return nil
diff --git a/pkg/api/server/register_auth.go b/pkg/api/server/register_auth.go
index e66a211fd..beb37bf00 100644
--- a/pkg/api/server/register_auth.go
+++ b/pkg/api/server/register_auth.go
@@ -23,9 +23,9 @@ func (s *APIServer) registerAuthHandlers(r *mux.Router) error {
// $ref: "#/definitions/AuthConfig"
// responses:
// 200:
- // $ref: "#/responses/SystemAuthResponse"
+ // $ref: "#/responses/systemAuthResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/auth"), s.APIHandler(compat.Auth)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/auth", s.APIHandler(compat.Auth)).Methods(http.MethodPost)
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 89324794e..e2ecdb6af 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -29,15 +29,15 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// required: true
// responses:
// 201:
- // $ref: "#/responses/ContainerCreateResponse"
+ // $ref: "#/responses/containerCreateResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/create"), s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/create", s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
@@ -90,11 +90,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsListContainer"
+ // $ref: "#/responses/containersList"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/json"), s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/json", s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
@@ -116,9 +116,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsContainerPruneReport"
+ // $ref: "#/responses/containersPrune"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/prune", s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
@@ -153,13 +153,13 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}", s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
@@ -184,11 +184,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsContainerInspectResponse"
+ // $ref: "#/responses/containerInspectResponse"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/json"), s.APIHandler(compat.GetContainer)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/json", s.APIHandler(compat.GetContainer)).Methods(http.MethodGet)
@@ -221,11 +221,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/kill"), s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/kill", s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
@@ -277,9 +277,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: logs returned as a stream in response body.
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/logs"), s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/logs", s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
@@ -301,9 +301,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/pause", s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
@@ -328,9 +328,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/restart"), s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/restart", s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
@@ -356,11 +356,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 304:
- // $ref: "#/responses/ContainerAlreadyStartedError"
+ // $ref: "#/responses/containerAlreadyStartedError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/start"), s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/start", s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
@@ -390,11 +390,13 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // description: OK
+ // description: no error
+ // schema:
+ // type: object
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/stats", s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
@@ -420,11 +422,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 304:
- // $ref: "#/responses/ContainerAlreadyStoppedError"
+ // $ref: "#/responses/containerAlreadyStoppedError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/stop"), s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/stop", s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
@@ -448,11 +450,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsContainerTopResponse"
+ // $ref: "#/responses/containerTopResponse"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/top"), s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/top", s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
@@ -474,9 +476,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/unpause"), s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/unpause", s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
@@ -512,11 +514,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/ContainerWaitResponse"
+ // $ref: "#/responses/containerWaitResponse"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/wait"), s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/wait", s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost)
@@ -569,11 +571,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 101:
// description: No error, connection has been hijacked for transporting streams.
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/attach"), s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/attach", s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
@@ -610,9 +612,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// $ref: "#/responses/ok"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
@@ -634,9 +636,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: tarball is returned in body
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
r.HandleFunc("/containers/{name}/export", s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/rename compat ContainerRename
@@ -662,11 +664,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
r.HandleFunc("/containers/{name}/rename", s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
@@ -689,15 +691,15 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// $ref: "#/definitions/SpecGenerator"
// responses:
// 201:
- // $ref: "#/responses/ContainerCreateResponse"
+ // $ref: "#/responses/containerCreateResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/create"), s.APIHandler(libpod.CreateContainer)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/json libpod ContainerListLibpod
// ---
@@ -758,11 +760,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/ListContainers"
+ // $ref: "#/responses/containersListLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/json"), s.APIHandler(libpod.ListContainers)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/prune libpod ContainerPruneLibpod
// ---
@@ -782,9 +784,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodPruneResponse"
+ // $ref: "#/responses/containersPruneLibpod"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/showmounted libpod ContainerShowMountedLibpod
// ---
@@ -802,7 +804,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// additionalProperties:
// type: string
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/showmounted"), s.APIHandler(libpod.ShowMountedContainers)).Methods(http.MethodGet)
// swagger:operation DELETE /libpod/containers/{name} libpod ContainerDeleteLibpod
// ---
@@ -841,17 +843,17 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodContainerRmReport"
+ // $ref: "#/responses/containerRemoveLibpod"
// 204:
// description: no error
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
// swagger:operation GET /libpod/containers/{name}/json libpod ContainerInspectLibpod
// ---
@@ -873,11 +875,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/LibpodInspectContainerResponse"
+ // $ref: "#/responses/containerInspectResponseLibpod"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/json"), s.APIHandler(libpod.GetContainer)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{name}/kill libpod ContainerKillLibpod
// ---
@@ -902,11 +904,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/kill"), s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/mount libpod ContainerMountLibpod
// ---
@@ -930,9 +932,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// type: string
// example: /var/lib/containers/storage/overlay/f3f693bd88872a1e3193f4ebb925f4c282e8e73aadb8ab3e7492754dda3a02a4/merged
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/mount"), s.APIHandler(libpod.MountContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/unmount libpod ContainerUnmountLibpod
// ---
@@ -952,9 +954,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: ok
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/unmount"), s.APIHandler(libpod.UnmountContainer)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/{name}/logs libpod ContainerLogsLibpod
// ---
@@ -1004,9 +1006,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: logs returned as a stream in response body.
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/logs"), s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{name}/pause libpod ContainerPauseLibpod
// ---
@@ -1026,9 +1028,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // "$ref": "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // "$ref": "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/restart libpod ContainerRestartLibpod
// ---
@@ -1052,9 +1054,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/restart"), s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/start libpod ContainerStartLibpod
// ---
@@ -1078,11 +1080,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 304:
- // $ref: "#/responses/ContainerAlreadyStartedError"
+ // $ref: "#/responses/containerAlreadyStartedError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/start"), s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/{name}/stats libpod ContainerStatsLibpod
// ---
@@ -1107,11 +1109,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
// swagger:operation GET /libpod/containers/stats libpod ContainersStatsAllLibpod
// ---
@@ -1140,11 +1142,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/ContainerStats"
+ // $ref: "#/responses/containerStats"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/stats"), s.APIHandler(libpod.StatsContainer)).Methods(http.MethodGet)
// swagger:operation GET /libpod/containers/{name}/top libpod ContainerTopLibpod
@@ -1179,11 +1181,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsContainerTopResponse"
+ // $ref: "#/responses/containerTopResponse"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/top"), s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{name}/unpause libpod ContainerUnpauseLibpod
// ---
@@ -1202,16 +1204,16 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/unpause"), s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/wait libpod ContainerWaitLibpod
// ---
// tags:
// - containers
// summary: Wait on a container
- // description: Wait on a container to met a given condition
+ // description: Wait on a container to meet a given condition
// parameters:
// - in: path
// name: name
@@ -1250,9 +1252,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// examples:
// text/plain: 137
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/wait"), s.APIHandler(libpod.WaitContainer)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/{name}/exists libpod ContainerExistsLibpod
// ---
@@ -1272,9 +1274,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: container exists
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/exists"), s.APIHandler(libpod.ContainerExists)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{name}/stop libpod ContainerStopLibpod
// ---
@@ -1308,11 +1310,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 304:
- // $ref: "#/responses/ContainerAlreadyStoppedError"
+ // $ref: "#/responses/containerAlreadyStoppedError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/stop"), s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/attach libpod ContainerAttachLibpod
// ---
@@ -1363,11 +1365,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 101:
// description: No error, connection has been hijacked for transporting streams.
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/attach"), s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/resize libpod ContainerResizeLibpod
// ---
@@ -1397,11 +1399,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// $ref: "#/responses/ok"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /libpod/containers/{name}/export libpod ContainerExportLibpod
// ---
@@ -1421,9 +1423,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: tarball is returned in body
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{name}/checkpoint libpod ContainerCheckpointLibpod
// ---
@@ -1466,9 +1468,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: tarball is returned in body if exported
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/checkpoint"), s.APIHandler(libpod.Checkpoint)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/restore libpod ContainerRestoreLibpod
// ---
@@ -1524,9 +1526,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 200:
// description: tarball is returned in body if exported
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/restore"), s.APIHandler(libpod.Restore)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/changes compat ContainerChanges
// swagger:operation GET /libpod/containers/{name}/changes libpod ContainerChangesLibpod
@@ -1564,9 +1566,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// schema:
// $ref: "#/responses/Changes"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/containers/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet)
r.HandleFunc("/containers/{name}/changes", s.APIHandler(compat.Changes)).Methods(http.MethodGet)
r.HandleFunc(VersionedPath("/libpod/containers/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet)
@@ -1590,9 +1592,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 304:
// description: container already initialized
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/init"), s.APIHandler(libpod.InitContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/containers/{name}/rename libpod ContainerRenameLibpod
// ---
@@ -1617,11 +1619,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
return nil
}
diff --git a/pkg/api/server/register_events.go b/pkg/api/server/register_events.go
index 10a7b76fc..76f9ec619 100644
--- a/pkg/api/server/register_events.go
+++ b/pkg/api/server/register_events.go
@@ -33,7 +33,7 @@ func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
// 200:
// description: returns a string of json data describing an event
// 500:
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/events"), s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/events", s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
@@ -67,7 +67,7 @@ func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
// 200:
// description: returns a string of json data describing an event
// 500:
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/events"), s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go
index 90136463d..cf1fb8c16 100644
--- a/pkg/api/server/register_exec.go
+++ b/pkg/api/server/register_exec.go
@@ -69,11 +69,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
// description: container is paused
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/containers/{name}/exec"), s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/containers/{name}/exec", s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
@@ -107,11 +107,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 200:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 409:
// description: container is not running
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/exec/{id}/start"), s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/start", s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
@@ -147,9 +147,9 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/exec/{id}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
@@ -169,11 +169,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/InspectExecSession"
+ // $ref: "#/responses/execSessionInspect"
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/exec/{id}/json"), s.APIHandler(compat.ExecInspectHandler)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/json", s.APIHandler(compat.ExecInspectHandler)).Methods(http.MethodGet)
@@ -243,11 +243,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
// description: container is paused
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/containers/{name}/exec"), s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// swagger:operation POST /libpod/exec/{id}/start libpod ExecStartLibpod
// ---
@@ -285,11 +285,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 200:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 409:
// description: container is not running.
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/exec/{id}/start"), s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// swagger:operation POST /libpod/exec/{id}/resize libpod ExecResizeLibpod
// ---
@@ -318,9 +318,9 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/exec/{id}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /libpod/exec/{id}/json libpod ExecInspectLibpod
// ---
@@ -340,9 +340,9 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 200:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchExecInstance"
+ // $ref: "#/responses/execSessionNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/exec/{id}/json"), s.APIHandler(compat.ExecInspectHandler)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go
index 6b7f0cfe7..82fbe3d09 100644
--- a/pkg/api/server/register_generate.go
+++ b/pkg/api/server/register_generate.go
@@ -103,7 +103,7 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// additionalProperties:
// type: string
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/systemd"), s.APIHandler(libpod.GenerateSystemd)).Methods(http.MethodGet)
// swagger:operation GET /libpod/generate/kube libpod GenerateKubeLibpod
@@ -127,15 +127,16 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// default: false
// description: Generate YAML for a Kubernetes service object.
// produces:
+ // - text/vnd.yaml
// - application/json
// responses:
// 200:
- // description: no error
+ // description: Kubernetes YAML file describing pod
// schema:
// type: string
// format: binary
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/generate/kube"), s.APIHandler(libpod.GenerateKube)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go
index 014e82fe4..4e2d4059a 100644
--- a/pkg/api/server/register_healthcheck.go
+++ b/pkg/api/server/register_healthcheck.go
@@ -24,13 +24,13 @@ func (s *APIServer) registerHealthCheckHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/HealthcheckRun"
+ // $ref: "#/responses/healthCheck"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 409:
// description: container has no healthcheck or is not running
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/containers/{name:.*}/healthcheck"), s.APIHandler(libpod.RunHealthCheck)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 89f808e7d..1617a5dd7 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -66,9 +66,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: "string"
// format: "binary"
// 404:
- // $ref: "#/responses/NoSuchImage"
+ // $ref: "#/responses/imageNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/images/create"), s.APIHandler(compat.CreateImageFromImage)).Methods(http.MethodPost).Queries("fromImage", "{fromImage}")
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/create", s.APIHandler(compat.CreateImageFromImage)).Methods(http.MethodPost).Queries("fromImage", "{fromImage}")
@@ -106,9 +106,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DockerImageSummaryResponse"
+ // $ref: "#/responses/imageList"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/json"), s.APIHandler(compat.GetImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/json", s.APIHandler(compat.GetImages)).Methods(http.MethodGet)
@@ -134,7 +134,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 200:
// description: no error
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/load"), s.APIHandler(compat.LoadImages)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/load", s.APIHandler(compat.LoadImages)).Methods(http.MethodPost)
@@ -159,9 +159,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsImageDeleteResponse"
+ // $ref: "#/responses/imageDeleteResponse"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/prune"), s.APIHandler(compat.PruneImages)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/prune", s.APIHandler(compat.PruneImages)).Methods(http.MethodPost)
@@ -202,11 +202,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsSearchResponse"
+ // $ref: "#/responses/registrySearchResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/search", s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
@@ -234,13 +234,13 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsImageDeleteResponse"
+ // $ref: "#/responses/imageDeleteResponse"
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 409:
- // $ref: '#/responses/ConflictError'
+ // $ref: '#/responses/conflictError'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/{name:.*}"), s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}", s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
@@ -285,9 +285,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/{name:.*}/push"), s.APIHandler(compat.PushImage)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/push", s.APIHandler(compat.PushImage)).Methods(http.MethodPost)
@@ -312,7 +312,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/{name:.*}/get"), s.APIHandler(compat.ExportImage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/get", s.APIHandler(compat.ExportImage)).Methods(http.MethodGet)
@@ -337,7 +337,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/get"), s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/get", s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
@@ -357,11 +357,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsHistory"
+ // $ref: "#/responses/history"
// 404:
- // $ref: "#/responses/NoSuchImage"
+ // $ref: "#/responses/imageNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/images/{name:.*}/history"), s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/history", s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
@@ -381,11 +381,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsImageInspect"
+ // $ref: "#/responses/imageInspect"
// 404:
- // $ref: "#/responses/NoSuchImage"
+ // $ref: "#/responses/imageNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/images/{name:.*}/json"), s.APIHandler(compat.GetImage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/json", s.APIHandler(compat.GetImage)).Methods(http.MethodGet)
@@ -415,13 +415,13 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 201:
// description: no error
// 400:
- // $ref: '#/responses/BadParamError'
+ // $ref: '#/responses/badParamError'
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 409:
- // $ref: '#/responses/ConflictError'
+ // $ref: '#/responses/conflictError'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/images/{name:.*}/tag"), s.APIHandler(compat.TagImage)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/tag", s.APIHandler(compat.TagImage)).Methods(http.MethodPost)
@@ -470,9 +470,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/commit"), s.APIHandler(compat.CommitContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/commit", s.APIHandler(compat.CommitContainer)).Methods(http.MethodPost)
@@ -699,9 +699,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// Successfully built 8ba084515c724cbf90d447a63600c0a6
// Successfully tagged your_image:latest
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/build"), s.APIHandler(compat.BuildImage)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/build", s.APIHandler(compat.BuildImage)).Methods(http.MethodPost)
@@ -743,9 +743,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/push"), s.APIHandler(libpod.PushImage)).Methods(http.MethodPost)
// swagger:operation GET /libpod/images/{name}/exists libpod ImageExistsLibpod
// ---
@@ -765,9 +765,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 204:
// description: image exists
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/exists"), s.APIHandler(libpod.ImageExists)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/{name}/tree libpod ImageTreeLibpod
// ---
@@ -789,11 +789,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/TreeResponse"
+ // $ref: "#/responses/treeResponse"
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/tree"), s.APIHandler(libpod.ImageTree)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/{name}/history libpod ImageHistoryLibpod
// ---
@@ -811,11 +811,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsHistory"
+ // $ref: "#/responses/history"
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/history"), s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/json libpod ImageListLibpod
// ---
@@ -844,9 +844,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/LibpodImageSummaryResponse"
+ // $ref: "#/responses/imageListLibpod"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/json"), s.APIHandler(compat.GetImages)).Methods(http.MethodGet)
// swagger:operation POST /libpod/images/load libpod ImageLoadLibpod
// ---
@@ -867,11 +867,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesLoadResponse"
+ // $ref: "#/responses/imagesLoadResponseLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/load"), s.APIHandler(libpod.ImagesLoad)).Methods(http.MethodPost)
// swagger:operation POST /libpod/images/import libpod ImageImportLibpod
// ---
@@ -916,11 +916,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/x-tar
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesImportResponse"
+ // $ref: "#/responses/imagesImportResponseLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/import"), s.APIHandler(libpod.ImagesImport)).Methods(http.MethodPost)
// swagger:operation DELETE /libpod/images/remove libpod ImageDeleteAllLibpod
// ---
@@ -952,11 +952,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesRemoveResponse"
+ // $ref: "#/responses/imagesRemoveResponseLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/remove"), s.APIHandler(libpod.ImagesBatchRemove)).Methods(http.MethodDelete)
// swagger:operation DELETE /libpod/images/{name} libpod ImageDeleteLibpod
// ---
@@ -978,15 +978,15 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesRemoveResponse"
+ // $ref: "#/responses/imagesRemoveResponseLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 409:
- // $ref: '#/responses/ConflictError'
+ // $ref: '#/responses/conflictError'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}"), s.APIHandler(libpod.ImagesRemove)).Methods(http.MethodDelete)
// swagger:operation POST /libpod/images/pull libpod ImagePullLibpod
// ---
@@ -1041,11 +1041,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesPullResponse"
+ // $ref: "#/responses/imagesPullResponseLibpod"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/pull"), s.APIHandler(libpod.ImagesPull)).Methods(http.MethodPost)
// swagger:operation POST /libpod/images/prune libpod ImagePruneLibpod
// ---
@@ -1080,9 +1080,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodPruneResponse"
+ // $ref: "#/responses/imagesPruneLibpod"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/prune"), s.APIHandler(libpod.PruneImages)).Methods(http.MethodPost)
// swagger:operation GET /libpod/images/search libpod ImageSearchLibpod
// ---
@@ -1122,9 +1122,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsSearchResponse"
+ // $ref: "#/responses/registrySearchResponse"
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/{name}/get libpod ImageGetLibpod
// ---
@@ -1155,9 +1155,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/get"), s.APIHandler(libpod.ExportImage)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/export libpod ImageExportLibpod
// ---
@@ -1193,9 +1193,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// type: string
// format: binary
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/export"), s.APIHandler(libpod.ExportImages)).Methods(http.MethodGet)
// swagger:operation GET /libpod/images/{name}/json libpod ImageInspectLibpod
// ---
@@ -1213,11 +1213,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodInspectImageResponse"
+ // $ref: "#/responses/inspectImageResponseLibpod"
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/json"), s.APIHandler(libpod.GetImage)).Methods(http.MethodGet)
// swagger:operation POST /libpod/images/{name}/tag libpod ImageTagLibpod
// ---
@@ -1245,13 +1245,13 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 201:
// description: no error
// 400:
- // $ref: '#/responses/BadParamError'
+ // $ref: '#/responses/badParamError'
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 409:
- // $ref: '#/responses/ConflictError'
+ // $ref: '#/responses/conflictError'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/tag"), s.APIHandler(compat.TagImage)).Methods(http.MethodPost)
// swagger:operation POST /libpod/commit libpod ImageCommitLibpod
// ---
@@ -1301,9 +1301,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 201:
// description: no error
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/commit"), s.APIHandler(libpod.CommitContainer)).Methods(http.MethodPost)
// swagger:operation POST /libpod/images/{name}/untag libpod ImageUntagLibpod
// ---
@@ -1331,13 +1331,13 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// 201:
// description: no error
// 400:
- // $ref: '#/responses/BadParamError'
+ // $ref: '#/responses/badParamError'
// 404:
- // $ref: '#/responses/NoSuchImage'
+ // $ref: '#/responses/imageNotFound'
// 409:
- // $ref: '#/responses/ConflictError'
+ // $ref: '#/responses/conflictError'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/images/{name:.*}/untag"), s.APIHandler(libpod.UntagImage)).Methods(http.MethodPost)
// swagger:operation GET /libpod/images/{name}/changes libpod ImageChangesLibpod
@@ -1374,9 +1374,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// schema:
// $ref: "#/responses/Changes"
// 404:
- // $ref: "#/responses/NoSuchContainer"
+ // $ref: "#/responses/containerNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/images/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet)
// swagger:operation POST /libpod/build libpod ImageBuildLibpod
@@ -1611,9 +1611,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// example: |
// (build details...)
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/build"), s.APIHandler(compat.BuildImage)).Methods(http.MethodPost)
return nil
}
diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go
index ccb145366..116d847cc 100644
--- a/pkg/api/server/register_info.go
+++ b/pkg/api/server/register_info.go
@@ -21,7 +21,7 @@ func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
// 200:
// description: to be determined
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/info"), s.APIHandler(compat.GetInfo)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/info", s.APIHandler(compat.GetInfo)).Methods(http.MethodGet)
@@ -35,9 +35,9 @@ func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/InfoResponse"
+ // $ref: "#/responses/infoResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/info"), s.APIHandler(libpod.GetInfo)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go
index 3e3a516f4..4fadb92fd 100644
--- a/pkg/api/server/register_manifest.go
+++ b/pkg/api/server/register_manifest.go
@@ -39,11 +39,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v3.Handle("/{name}/push", s.APIHandler(libpod.ManifestPushV3)).Methods(http.MethodPost)
// swagger:operation POST /libpod/manifests/{name}/registry/{destination} manifests ManifestPushLibpod
// ---
@@ -80,11 +80,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v4.Handle("/{name:.*}/registry/{destination:.*}", s.APIHandler(libpod.ManifestPush)).Methods(http.MethodPost)
// swagger:operation POST /libpod/manifests manifests ManifestCreateLibpod
// ---
@@ -123,11 +123,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchImage"
+ // $ref: "#/responses/imageNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v3.Handle("/create", s.APIHandler(libpod.ManifestCreate)).Methods(http.MethodPost)
v4.Handle("/{name:.*}", s.APIHandler(libpod.ManifestCreate)).Methods(http.MethodPost)
// swagger:operation GET /libpod/manifests/{name}/exists manifests ManifestExistsLibpod
@@ -149,9 +149,9 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// 204:
// description: manifest list exists
// 404:
- // $ref: '#/responses/NoSuchManifest'
+ // $ref: '#/responses/manifestNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
v3.Handle("/{name:.*}/exists", s.APIHandler(libpod.ManifestExists)).Methods(http.MethodGet)
v4.Handle("/{name:.*}/exists", s.APIHandler(libpod.ManifestExists)).Methods(http.MethodGet)
// swagger:operation GET /libpod/manifests/{name}/json manifests ManifestInspectLibpod
@@ -168,11 +168,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// description: the name or ID of the manifest list
// responses:
// 200:
- // $ref: "#/responses/InspectManifest"
+ // $ref: "#/responses/manifestInspect"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v3.Handle("/{name:.*}/json", s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet)
v4.Handle("/{name:.*}/json", s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet)
// swagger:operation PUT /libpod/manifests/{name} manifests ManifestModifyLibpod
@@ -208,15 +208,15 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/ManifestModifyReport"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 409:
// description: Operation had partial success, both Images and Errors may have members
// schema:
// $ref: "#/definitions/ManifestModifyReport"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v4.Handle("/{name:.*}", s.APIHandler(libpod.ManifestModify)).Methods(http.MethodPut)
// swagger:operation POST /libpod/manifests/{name}/add manifests ManifestAddLibpod
// ---
@@ -243,11 +243,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 409:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v3.Handle("/{name:.*}/add", s.APIHandler(libpod.ManifestAddV3)).Methods(http.MethodPost)
// swagger:operation DELETE /libpod/manifests/{name} manifests ManifestDeleteV3Libpod
// ---
@@ -273,11 +273,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v3.Handle("/{name:.*}", s.APIHandler(libpod.ManifestRemoveDigestV3)).Methods(http.MethodDelete)
// swagger:operation DELETE /libpod/manifests/{name} manifests ManifestDeleteLibpod
// ---
@@ -296,11 +296,11 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// description: The name or ID of the list to be deleted
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodImagesRemoveResponse"
+ // $ref: "#/responses/imagesRemoveResponseLibpod"
// 404:
- // $ref: "#/responses/NoSuchManifest"
+ // $ref: "#/responses/manifestNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
v4.Handle("/{name:.*}", s.APIHandler(libpod.ManifestDelete)).Methods(http.MethodDelete)
return nil
}
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go
index b900aa953..dcc656283 100644
--- a/pkg/api/server/register_networks.go
+++ b/pkg/api/server/register_networks.go
@@ -27,9 +27,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.RemoveNetwork)).Methods(http.MethodDelete)
r.HandleFunc("/networks/{name}", s.APIHandler(compat.RemoveNetwork)).Methods(http.MethodDelete)
// swagger:operation GET /networks/{name} compat NetworkInspect
@@ -58,11 +58,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/CompatNetworkInspect"
+ // $ref: "#/responses/networkInspectCompat"
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.InspectNetwork)).Methods(http.MethodGet)
r.HandleFunc("/networks/{name}", s.APIHandler(compat.InspectNetwork)).Methods(http.MethodGet)
// swagger:operation GET /networks compat NetworkList
@@ -85,9 +85,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/CompatNetworkList"
+ // $ref: "#/responses/networkListCompat"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks"), s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet)
r.HandleFunc("/networks", s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet)
// swagger:operation POST /networks/create compat NetworkCreate
@@ -103,7 +103,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for creating a network
// schema:
- // $ref: "#/definitions/NetworkCreateRequest"
+ // $ref: "#/definitions/networkCreate"
// responses:
// 201:
// description: network created
@@ -115,9 +115,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// Warning:
// type: string
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/create"), s.APIHandler(compat.CreateNetwork)).Methods(http.MethodPost)
r.HandleFunc("/networks/create", s.APIHandler(compat.CreateNetwork)).Methods(http.MethodPost)
// swagger:operation POST /networks/{name}/connect compat NetworkConnect
@@ -138,14 +138,14 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for connecting a container to a network
// schema:
- // $ref: "#/definitions/NetworkCompatConnectRequest"
+ // $ref: "#/definitions/networkConnectRequest"
// responses:
// 200:
// description: OK
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/{name}/connect"), s.APIHandler(compat.Connect)).Methods(http.MethodPost)
r.HandleFunc("/networks/{name}/connect", s.APIHandler(compat.Connect)).Methods(http.MethodPost)
// swagger:operation POST /networks/{name}/disconnect compat NetworkDisconnect
@@ -166,14 +166,14 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for disconnecting a container from a network
// schema:
- // $ref: "#/definitions/NetworkCompatDisconnectRequest"
+ // $ref: "#/definitions/networkDisconnectRequest"
// responses:
// 200:
// description: OK
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/{name}/disconnect"), s.APIHandler(compat.Disconnect)).Methods(http.MethodPost)
r.HandleFunc("/networks/{name}/disconnect", s.APIHandler(compat.Disconnect)).Methods(http.MethodPost)
// swagger:operation POST /networks/prune compat NetworkPrune
@@ -204,7 +204,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// items:
// type: string
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/prune"), s.APIHandler(compat.Prune)).Methods(http.MethodPost)
r.HandleFunc("/networks/prune", s.APIHandler(compat.Prune)).Methods(http.MethodPost)
@@ -228,11 +228,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/NetworkRmReport"
+ // $ref: "#/responses/networkRmResponse"
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/{name}"), s.APIHandler(libpod.RemoveNetwork)).Methods(http.MethodDelete)
// swagger:operation GET /libpod/networks/{name}/exists libpod NetworkExistsLibpod
// ---
@@ -252,9 +252,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// 204:
// description: network exists
// 404:
- // $ref: '#/responses/NoSuchNetwork'
+ // $ref: '#/responses/networkNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/networks/{name}/exists"), s.APIHandler(libpod.ExistsNetwork)).Methods(http.MethodGet)
// swagger:operation GET /libpod/networks/json libpod NetworkListLibpod
// ---
@@ -279,9 +279,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/NetworkListReport"
+ // $ref: "#/responses/networkListLibpod"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/json"), s.APIHandler(libpod.ListNetworks)).Methods(http.MethodGet)
// swagger:operation GET /libpod/networks/{name}/json libpod NetworkInspectLibpod
// ---
@@ -301,11 +301,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/NetworkInspectReport"
+ // $ref: "#/responses/networkInspectResponse"
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/{name}/json"), s.APIHandler(libpod.InspectNetwork)).Methods(http.MethodGet)
r.HandleFunc(VersionedPath("/libpod/networks/{name}"), s.APIHandler(libpod.InspectNetwork)).Methods(http.MethodGet)
// swagger:operation POST /libpod/networks/create libpod NetworkCreateLibpod
@@ -321,16 +321,16 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for creating a network
// schema:
- // $ref: "#/definitions/NetworkCreateLibpod"
+ // $ref: "#/definitions/networkCreateLibpod"
// responses:
// 200:
- // $ref: "#/responses/NetworkCreateReport"
+ // $ref: "#/responses/networkCreateResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 409:
- // $ref: "#/responses/ConflictError"
+ // $ref: "#/responses/conflictError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/create"), s.APIHandler(libpod.CreateNetwork)).Methods(http.MethodPost)
// swagger:operation POST /libpod/networks/{name}/connect libpod NetworkConnectLibpod
// ---
@@ -350,14 +350,14 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for connecting a container to a network
// schema:
- // $ref: "#/definitions/NetworkConnectRequest"
+ // $ref: "#/definitions/networkConnectRequestLibpod"
// responses:
// 200:
// description: OK
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/{name}/connect"), s.APIHandler(libpod.Connect)).Methods(http.MethodPost)
// swagger:operation POST /libpod/networks/{name}/disconnect libpod NetworkDisconnectLibpod
// ---
@@ -377,14 +377,14 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for disconnecting a container from a network
// schema:
- // $ref: "#/definitions/NetworkCompatDisconnectRequest"
+ // $ref: "#/definitions/networkDisconnectRequest"
// responses:
// 200:
// description: OK
// 404:
- // $ref: "#/responses/NoSuchNetwork"
+ // $ref: "#/responses/networkNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/{name}/disconnect"), s.APIHandler(compat.Disconnect)).Methods(http.MethodPost)
// swagger:operation POST /libpod/networks/prune libpod NetworkPruneLibpod
// ---
@@ -405,9 +405,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels.
// responses:
// 200:
- // $ref: "#/responses/NetworkPruneResponse"
+ // $ref: "#/responses/networkPruneResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/networks/prune"), s.APIHandler(libpod.Prune)).Methods(http.MethodPost)
return nil
}
diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go
index 22c7eb3fd..fcc8b4a10 100644
--- a/pkg/api/server/register_ping.go
+++ b/pkg/api/server/register_ping.go
@@ -59,7 +59,7 @@ func (s *APIServer) registerPingHandlers(r *mux.Router) error {
// Available if service is backed by Podman, therefore may be used to
// determine if talking to Podman engine or another engine
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
r.Handle(VersionedPath("/libpod/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
return nil
diff --git a/pkg/api/server/register_play.go b/pkg/api/server/register_play.go
index 52bc75bcf..35da80ccc 100644
--- a/pkg/api/server/register_play.go
+++ b/pkg/api/server/register_play.go
@@ -57,9 +57,9 @@ func (s *APIServer) registerPlayHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodPlayKubeResponse"
+ // $ref: "#/responses/playKubeResponseLibpod"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKube)).Methods(http.MethodPost)
// swagger:operation DELETE /libpod/play/kube libpod PlayKubeDownLibpod
// ---
@@ -72,9 +72,9 @@ func (s *APIServer) registerPlayHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsLibpodPlayKubeResponse"
+ // $ref: "#/responses/playKubeResponseLibpod"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKubeDown)).Methods(http.MethodDelete)
return nil
}
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go
index 7aeafe724..d54cc413e 100644
--- a/pkg/api/server/register_pods.go
+++ b/pkg/api/server/register_pods.go
@@ -31,11 +31,11 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// - `ctr-number=<pod-ctr-number>` Number of containers in the pod.
// responses:
// 200:
- // $ref: "#/responses/ListPodsResponse"
+ // $ref: "#/responses/podsListResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/json"), s.APIHandler(libpod.Pods)).Methods(http.MethodGet)
// swagger:operation POST /libpod/pods/create pods PodCreateLibpod
// ---
@@ -53,14 +53,14 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 409:
// description: status conflict
// schema:
// type: string
// description: message describing error
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/create"), s.APIHandler(libpod.PodCreate)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/prune pods PodPruneLibpod
// ---
@@ -69,13 +69,13 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: '#/responses/PodPruneReport'
+ // $ref: '#/responses/podPruneResponse'
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 409:
// description: pod already exists
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/prune"), s.APIHandler(libpod.PodPrune)).Methods(http.MethodPost)
// swagger:operation DELETE /libpod/pods/{name} pods PodDeleteLibpod
// ---
@@ -94,13 +94,13 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description : force removal of a running pod by first stopping all containers, then removing all containers in the pod
// responses:
// 200:
- // $ref: '#/responses/PodRmReport'
+ // $ref: '#/responses/podRmResponse'
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}"), s.APIHandler(libpod.PodDelete)).Methods(http.MethodDelete)
// swagger:operation GET /libpod/pods/{name}/json pods PodInspectLibpod
// ---
@@ -115,11 +115,11 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: the name or ID of the pod
// responses:
// 200:
- // $ref: "#/responses/InspectPodResponse"
+ // $ref: "#/responses/podInspectResponse"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/json"), s.APIHandler(libpod.PodInspect)).Methods(http.MethodGet)
// swagger:operation GET /libpod/pods/{name}/exists pods PodExistsLibpod
// ---
@@ -137,9 +137,9 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// 204:
// description: pod exists
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/exists"), s.APIHandler(libpod.PodExists)).Methods(http.MethodGet)
// swagger:operation POST /libpod/pods/{name}/kill pods PodKillLibpod
// ---
@@ -159,15 +159,15 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// default: SIGKILL
// responses:
// 200:
- // $ref: "#/responses/PodKillReport"
+ // $ref: "#/responses/podKillResponse"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: "#/responses/PodKillReport"
+ // $ref: "#/responses/podKillResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/kill"), s.APIHandler(libpod.PodKill)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/{name}/pause pods PodPauseLibpod
// ---
@@ -183,13 +183,13 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: the name or ID of the pod
// responses:
// 200:
- // $ref: '#/responses/PodPauseReport'
+ // $ref: '#/responses/podPauseResponse'
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: '#/responses/PodPauseReport'
+ // $ref: '#/responses/podPauseResponse'
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/pause"), s.APIHandler(libpod.PodPause)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/{name}/restart pods PodRestartLibpod
// ---
@@ -204,13 +204,13 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: the name or ID of the pod
// responses:
// 200:
- // $ref: '#/responses/PodRestartReport'
+ // $ref: '#/responses/podRestartResponse'
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: "#/responses/PodRestartReport"
+ // $ref: "#/responses/podRestartResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/restart"), s.APIHandler(libpod.PodRestart)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/{name}/start pods PodStartLibpod
// ---
@@ -225,15 +225,15 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: the name or ID of the pod
// responses:
// 200:
- // $ref: '#/responses/PodStartReport'
+ // $ref: '#/responses/podStartResponse'
// 304:
- // $ref: "#/responses/PodAlreadyStartedError"
+ // $ref: "#/responses/podAlreadyStartedError"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: '#/responses/PodStartReport'
+ // $ref: '#/responses/podStartResponse'
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/start"), s.APIHandler(libpod.PodStart)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/{name}/stop pods PodStopLibpod
// ---
@@ -252,17 +252,17 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: timeout
// responses:
// 200:
- // $ref: '#/responses/PodStopReport'
+ // $ref: '#/responses/podStopResponse'
// 304:
- // $ref: "#/responses/PodAlreadyStoppedError"
+ // $ref: "#/responses/podAlreadyStoppedError"
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: "#/responses/PodStopReport"
+ // $ref: "#/responses/podStopResponse"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/stop"), s.APIHandler(libpod.PodStop)).Methods(http.MethodPost)
// swagger:operation POST /libpod/pods/{name}/unpause pods PodUnpauseLibpod
// ---
@@ -277,13 +277,13 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// description: the name or ID of the pod
// responses:
// 200:
- // $ref: '#/responses/PodUnpauseReport'
+ // $ref: '#/responses/podUnpauseResponse'
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 409:
- // $ref: '#/responses/PodUnpauseReport'
+ // $ref: '#/responses/podUnpauseResponse'
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/unpause"), s.APIHandler(libpod.PodUnpause)).Methods(http.MethodPost)
// swagger:operation GET /libpod/pods/{name}/top pods PodTopLibpod
// ---
@@ -315,17 +315,17 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
// responses:
// 200:
- // $ref: "#/responses/DocsPodTopResponse"
+ // $ref: "#/responses/podTopResponse"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/{name}/top"), s.APIHandler(libpod.PodTop)).Methods(http.MethodGet)
// swagger:operation GET /libpod/pods/stats pods PodStatsAllLibpod
// ---
// tags:
// - pods
- // summary: Get stats for one or more pods
+ // summary: Statistics for one or more pods
// description: Display a live stream of resource usage statistics for the containers in one or more pods
// parameters:
// - in: query
@@ -342,11 +342,11 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/DocsPodTopResponse"
+ // $ref: "#/responses/podStatsResponse"
// 404:
- // $ref: "#/responses/NoSuchPod"
+ // $ref: "#/responses/podNotFound"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/pods/stats"), s.APIHandler(libpod.PodStats)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_secrets.go b/pkg/api/server/register_secrets.go
index 26bc07834..f4608baa6 100644
--- a/pkg/api/server/register_secrets.go
+++ b/pkg/api/server/register_secrets.go
@@ -36,7 +36,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '201':
// $ref: "#/responses/SecretCreateResponse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/secrets/create"), s.APIHandler(libpod.CreateSecret)).Methods(http.MethodPost)
// swagger:operation GET /libpod/secrets/json libpod SecretListLibpod
// ---
@@ -59,7 +59,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '200':
// "$ref": "#/responses/SecretListResponse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/secrets/json"), s.APIHandler(compat.ListSecrets)).Methods(http.MethodGet)
// swagger:operation GET /libpod/secrets/{name}/json libpod SecretInspectLibpod
// ---
@@ -80,7 +80,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '404':
// "$ref": "#/responses/NoSuchSecret"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/secrets/{name}/json"), s.APIHandler(compat.InspectSecret)).Methods(http.MethodGet)
// swagger:operation DELETE /libpod/secrets/{name} libpod SecretDeleteLibpod
// ---
@@ -106,7 +106,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '404':
// "$ref": "#/responses/NoSuchSecret"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/secrets/{name}"), s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete)
/*
@@ -133,7 +133,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '200':
// "$ref": "#/responses/SecretListCompatResponse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/secrets"), s.APIHandler(compat.ListSecrets)).Methods(http.MethodGet)
r.Handle("/secrets", s.APIHandler(compat.ListSecrets)).Methods(http.MethodGet)
// swagger:operation POST /secrets/create compat SecretCreate
@@ -156,7 +156,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '409':
// "$ref": "#/responses/SecretInUse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/secrets/create"), s.APIHandler(compat.CreateSecret)).Methods(http.MethodPost)
r.Handle("/secrets/create", s.APIHandler(compat.CreateSecret)).Methods(http.MethodPost)
// swagger:operation GET /secrets/{name} compat SecretInspect
@@ -178,7 +178,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '404':
// "$ref": "#/responses/NoSuchSecret"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/secrets/{name}"), s.APIHandler(compat.InspectSecret)).Methods(http.MethodGet)
r.Handle("/secrets/{name}", s.APIHandler(compat.InspectSecret)).Methods(http.MethodGet)
// swagger:operation DELETE /secrets/{name} compat SecretDelete
@@ -200,7 +200,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error {
// '404':
// "$ref": "#/responses/NoSuchSecret"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/secrets/{name}"), s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete)
r.Handle("/secret/{name}", s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete)
diff --git a/pkg/api/server/register_system.go b/pkg/api/server/register_system.go
index a70f3b5f2..8932ecc81 100644
--- a/pkg/api/server/register_system.go
+++ b/pkg/api/server/register_system.go
@@ -19,9 +19,9 @@ func (s *APIServer) registerSystemHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: '#/responses/SystemDiskUse'
+ // $ref: '#/responses/systemDiskUsage'
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/system/df"), s.APIHandler(compat.GetDiskUsage)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/system/df", s.APIHandler(compat.GetDiskUsage)).Methods(http.MethodGet)
@@ -34,11 +34,11 @@ func (s *APIServer) registerSystemHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: '#/responses/SystemPruneReport'
+ // $ref: '#/responses/systemPruneResponse'
// 400:
- // $ref: "#/responses/BadParamError"
+ // $ref: "#/responses/badParamError"
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/system/prune"), s.APIHandler(libpod.SystemPrune)).Methods(http.MethodPost)
// swagger:operation GET /libpod/system/df libpod SystemDataUsageLibpod
// ---
@@ -50,9 +50,9 @@ func (s *APIServer) registerSystemHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: '#/responses/SystemDiskUse'
+ // $ref: '#/responses/systemDiskUsage'
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/system/df"), s.APIHandler(libpod.DiskUsage)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go
index e9680f9ef..f7bdc2ea9 100644
--- a/pkg/api/server/register_version.go
+++ b/pkg/api/server/register_version.go
@@ -17,7 +17,7 @@ func (s *APIServer) registerVersionHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/Version"
+ // $ref: "#/responses/versionResponse"
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 SystemVersionLibpod
@@ -29,7 +29,7 @@ func (s *APIServer) registerVersionHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: "#/responses/Version"
+ // $ref: "#/responses/versionResponse"
r.Handle(VersionedPath("/libpod/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet)
return nil
}
diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go
index d36350146..820953b09 100644
--- a/pkg/api/server/register_volumes.go
+++ b/pkg/api/server/register_volumes.go
@@ -19,14 +19,14 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// name: create
// description: attributes for creating a volume
// schema:
- // $ref: "#/definitions/VolumeCreate"
+ // $ref: "#/definitions/VolumeCreateOptions"
// produces:
// - application/json
// responses:
// '201':
- // $ref: "#/responses/VolumeCreateResponse"
+ // $ref: "#/responses/volumeCreateResponse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/volumes/create"), s.APIHandler(libpod.CreateVolume)).Methods(http.MethodPost)
// swagger:operation GET /libpod/volumes/{name}/exists libpod VolumeExistsLibpod
// ---
@@ -46,9 +46,9 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// 204:
// description: volume exists
// 404:
- // $ref: '#/responses/NoSuchVolume'
+ // $ref: '#/responses/volumeNotFound'
// 500:
- // $ref: '#/responses/InternalError'
+ // $ref: '#/responses/internalError'
r.Handle(VersionedPath("/libpod/volumes/{name}/exists"), s.APIHandler(libpod.ExistsVolume)).Methods(http.MethodGet)
// swagger:operation GET /libpod/volumes/json libpod VolumeListLibpod
// ---
@@ -71,9 +71,9 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// - `until=<timestamp>` List volumes created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
// responses:
// '200':
- // "$ref": "#/responses/VolumeList"
+ // "$ref": "#/responses/volumeListLibpod"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/volumes/json"), s.APIHandler(libpod.ListVolumes)).Methods(http.MethodGet)
// swagger:operation POST /libpod/volumes/prune libpod VolumePruneLibpod
// ---
@@ -93,9 +93,9 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.
// responses:
// '200':
- // "$ref": "#/responses/VolumePruneResponse"
+ // "$ref": "#/responses/volumePruneLibpod"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/libpod/volumes/prune"), s.APIHandler(libpod.PruneVolumes)).Methods(http.MethodPost)
// swagger:operation GET /libpod/volumes/{name}/json libpod VolumeInspectLibpod
// ---
@@ -111,12 +111,12 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// produces:
// - application/json
// responses:
- // '200':
- // "$ref": "#/responses/VolumeCreateResponse"
- // '404':
- // "$ref": "#/responses/NoSuchVolume"
- // '500':
- // "$ref": "#/responses/InternalError"
+ // 200:
+ // $ref: "#/responses/volumeCreateResponse"
+ // 404:
+ // $ref: "#/responses/volumeNotFound"
+ // 500:
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/volumes/{name}/json"), s.APIHandler(libpod.InspectVolume)).Methods(http.MethodGet)
// swagger:operation DELETE /libpod/volumes/{name} libpod VolumeDeleteLibpod
// ---
@@ -139,11 +139,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // $ref: "#/responses/NoSuchVolume"
+ // $ref: "#/responses/volumeNotFound"
// 409:
// description: Volume is in use and cannot be removed
// 500:
- // $ref: "#/responses/InternalError"
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/libpod/volumes/{name}"), s.APIHandler(libpod.RemoveVolume)).Methods(http.MethodDelete)
/*
@@ -173,9 +173,9 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// The boolean `dangling` filter is not yet implemented for this endpoint.
// responses:
// '200':
- // "$ref": "#/responses/VolumeListResponse"
+ // "$ref": "#/responses/volumeList"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/volumes"), s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet)
r.Handle("/volumes", s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet)
@@ -191,14 +191,14 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// attributes for creating a volume.
// Note: If a volume by the same name exists, a 201 response with that volume's information will be generated.
// schema:
- // $ref: "#/definitions/DockerVolumeCreate"
+ // $ref: "#/definitions/volumeCreate"
// produces:
// - application/json
// responses:
// '201':
- // "$ref": "#/responses/DockerVolumeInfoResponse"
+ // "$ref": "#/responses/volumeInspect"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/volumes/create"), s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost)
r.Handle("/volumes/create", s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost)
@@ -216,12 +216,12 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// produces:
// - application/json
// responses:
- // '200':
- // "$ref": "#/responses/DockerVolumeInfoResponse"
- // '404':
- // "$ref": "#/responses/NoSuchVolume"
- // '500':
- // "$ref": "#/responses/InternalError"
+ // 200:
+ // $ref: "#/responses/volumeInspect"
+ // 40':
+ // $ref: "#/responses/volumeNotFound"
+ // 500:
+ // $ref: "#/responses/internalError"
r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet)
r.Handle("/volumes/{name}", s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet)
@@ -249,11 +249,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// 204:
// description: no error
// 404:
- // "$ref": "#/responses/NoSuchVolume"
+ // $ref: "#/responses/volumeNotFound"
// 409:
// description: Volume is in use and cannot be removed
// 500:
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete)
r.Handle("/volumes/{name}", s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete)
@@ -275,9 +275,9 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.
// responses:
// '200':
- // "$ref": "#/responses/DockerVolumePruneResponse"
+ // "$ref": "#/responses/volumePruneResponse"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/internalError"
r.Handle(VersionedPath("/volumes/prune"), s.APIHandler(compat.PruneVolumes)).Methods(http.MethodPost)
r.Handle("/volumes/prune", s.APIHandler(compat.PruneVolumes)).Methods(http.MethodPost)
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 7f5537fb4..7a7e35e8e 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -45,10 +45,8 @@ const (
UnlimitedServiceDuration = 0 * time.Second
)
-var (
- // shutdownOnce ensures Shutdown() may safely be called from several go routines
- shutdownOnce sync.Once
-)
+// shutdownOnce ensures Shutdown() may safely be called from several go routines
+var shutdownOnce sync.Once
// NewServer will create and configure a new API server with all defaults
func NewServer(runtime *libpod.Runtime) (*APIServer, error) {
@@ -209,7 +207,7 @@ func (s *APIServer) Serve() error {
}()
// Before we start serving, ensure umask is properly set for container creation.
- _ = syscall.Umask(0022)
+ _ = syscall.Umask(0o022)
errChan := make(chan error, 1)
s.setupSystemd()
diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go
deleted file mode 100644
index 6cf89581a..000000000
--- a/pkg/api/server/swagger.go
+++ /dev/null
@@ -1,246 +0,0 @@
-package server
-
-import (
- "github.com/containers/podman/v4/libpod/define"
- "github.com/containers/podman/v4/pkg/domain/entities"
- "github.com/containers/podman/v4/pkg/domain/entities/reports"
- "github.com/containers/podman/v4/pkg/errorhandling"
- docker "github.com/docker/docker/api/types"
-)
-
-// No such image
-// swagger:response NoSuchImage
-type swagErrNoSuchImage struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such container
-// swagger:response NoSuchContainer
-type swagErrNoSuchContainer struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such network
-// swagger:response NoSuchNetwork
-type swagErrNoSuchNetwork struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such exec instance
-// swagger:response NoSuchExecInstance
-type swagErrNoSuchExecInstance struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such volume
-// swagger:response NoSuchVolume
-type swagErrNoSuchVolume struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such pod
-// swagger:response NoSuchPod
-type swagErrNoSuchPod struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// No such manifest
-// swagger:response NoSuchManifest
-type swagErrNoSuchManifest struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Internal server error
-// swagger:response InternalError
-type swagInternalError struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Conflict error in operation
-// swagger:response ConflictError
-type swagConflictError struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Bad parameter in request
-// swagger:response BadParamError
-type swagBadParamError struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Container already started
-// swagger:response ContainerAlreadyStartedError
-type swagContainerAlreadyStartedError struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Container already stopped
-// swagger:response ContainerAlreadyStoppedError
-type swagContainerAlreadyStopped struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Pod already started
-// swagger:response PodAlreadyStartedError
-type swagPodAlreadyStartedError struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Pod already stopped
-// swagger:response PodAlreadyStoppedError
-type swagPodAlreadyStopped struct {
- // in:body
- Body struct {
- errorhandling.ErrorModel
- }
-}
-
-// Image summary for compat API
-// swagger:response DockerImageSummaryResponse
-type swagDockerImageSummaryResponse struct {
- // in:body
- Body []docker.ImageSummary
-}
-
-// Image summary for libpod API
-// swagger:response LibpodImageSummaryResponse
-type swagLibpodImageSummaryResponse struct {
- // in:body
- Body []entities.ImageSummary
-}
-
-// List Containers
-// swagger:response DocsListContainer
-type swagListContainers struct {
- // in:body
- Body struct {
- // This causes go-swagger to crash
- // handlers.Container
- }
-}
-
-// Success
-// swagger:response
-type ok struct {
- // in:body
- Body struct {
- // example: OK
- ok string
- }
-}
-
-// Volume prune response
-// swagger:response VolumePruneResponse
-type swagVolumePruneResponse struct {
- // in:body
- Body []reports.PruneReport
-}
-
-// Volume create response
-// swagger:response VolumeCreateResponse
-type swagVolumeCreateResponse struct {
- // in:body
- Body struct {
- entities.VolumeConfigResponse
- }
-}
-
-// Volume list
-// swagger:response VolumeList
-type swagVolumeListResponse struct {
- // in:body
- Body []entities.VolumeConfigResponse
-}
-
-// Healthcheck
-// swagger:response HealthcheckRun
-type swagHealthCheckRunResponse struct {
- // in:body
- Body struct {
- define.HealthCheckResults
- }
-}
-
-// Version
-// swagger:response Version
-type swagVersion struct {
- // in:body
- Body struct {
- entities.ComponentVersion
- }
-}
-
-// Disk usage
-// swagger:response SystemDiskUse
-type swagDiskUseResponse struct {
- // in:body
- Body struct {
- entities.SystemDfReport
- }
-}
-
-// Prune report
-// swagger:response SystemPruneReport
-type swagSystemPruneReport struct {
- // in:body
- Body struct {
- entities.SystemPruneReport
- }
-}
-
-// Auth response
-// swagger:response SystemAuthResponse
-type swagSystemAuthResponse struct {
- // in:body
- Body struct {
- entities.AuthReport
- }
-}
-
-// Inspect response
-// swagger:response InspectExecSession
-type swagInspectExecSession struct {
- // in:body
- Body struct {
- define.InspectExecSession
- }
-}