diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-04-05 17:13:15 -0700 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-04-16 14:02:43 -0400 |
commit | d42f6e3cd21867112471c768fb31123a92409166 (patch) | |
tree | cb14bb4b6768ed89f688def4b9dfd7348655e8e7 | |
parent | 430ecf41a1ea43e63e288d2d0a58565915c62de1 (diff) | |
download | podman-d42f6e3cd21867112471c768fb31123a92409166.tar.gz podman-d42f6e3cd21867112471c768fb31123a92409166.tar.bz2 podman-d42f6e3cd21867112471c768fb31123a92409166.zip |
[CI:DOCS] Set all operation id to be compatibile
Libpod operation id's changed to better match compatibile id
Builds on https://github.com/containers/podman/pull/9123 and corrects
a duplicated ID.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
-rw-r--r-- | pkg/api/server/docs.go | 12 | ||||
-rw-r--r-- | pkg/api/server/register_archive.go | 4 | ||||
-rw-r--r-- | pkg/api/server/register_auth.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_containers.go | 58 | ||||
-rw-r--r-- | pkg/api/server/register_events.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_exec.go | 10 | ||||
-rw-r--r-- | pkg/api/server/register_generate.go | 4 | ||||
-rw-r--r-- | pkg/api/server/register_healthcheck.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_images.go | 47 | ||||
-rw-r--r-- | pkg/api/server/register_info.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_manifest.go | 12 | ||||
-rw-r--r-- | pkg/api/server/register_networks.go | 58 | ||||
-rw-r--r-- | pkg/api/server/register_ping.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_play.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_pods.go | 28 | ||||
-rw-r--r-- | pkg/api/server/register_secrets.go | 16 | ||||
-rw-r--r-- | pkg/api/server/register_system.go | 17 | ||||
-rw-r--r-- | pkg/api/server/register_version.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_volumes.go | 12 | ||||
-rw-r--r-- | pkg/api/tags.yaml | 2 |
20 files changed, 135 insertions, 159 deletions
diff --git a/pkg/api/server/docs.go b/pkg/api/server/docs.go index a99fefd7b..e72b78221 100644 --- a/pkg/api/server/docs.go +++ b/pkg/api/server/docs.go @@ -1,4 +1,4 @@ -// Package api Provides a container compatible interface. +// Package api Provides an 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 @@ -21,22 +21,22 @@ // // 'podman info' // -// curl --unix-socket /run/podman/podman.sock http://d/v1.0.0/libpod/info +// curl --unix-socket /run/podman/podman.sock http://d/v3.0.0/libpod/info // // 'podman pull quay.io/containers/podman' // -// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v1.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman' +// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman' // // 'podman list images' // -// curl --unix-socket /run/podman/podman.sock -v 'http://d/v1.0.0/libpod/images/json' | jq +// curl --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/libpod/images/json' | jq // // Terms Of Service: // // Schemes: http, https // Host: podman.io // BasePath: / -// Version: 0.0.1 +// Version: 3.2.0 // License: Apache-2.0 https://opensource.org/licenses/Apache-2.0 // Contact: Podman <podman@lists.podman.io> https://podman.io/community/ // @@ -47,8 +47,8 @@ // // Produces: // - application/json +// - application/octet-stream // - text/plain -// - text/html // // Consumes: // - application/json diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go index af64bd993..ee7449fbb 100644 --- a/pkg/api/server/register_archive.go +++ b/pkg/api/server/register_archive.go @@ -91,7 +91,7 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error { Libpod */ - // swagger:operation PUT /libpod/containers/{name}/archive libpod libpodPutArchive + // swagger:operation PUT /libpod/containers/{name}/archive libpod PutContainerArchiveLibpod // --- // summary: Copy files into a container // description: Copy a tar archive of files into a container @@ -132,7 +132,7 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" - // swagger:operation GET /libpod/containers/{name}/archive libpod libpodGetArchive + // swagger:operation GET /libpod/containers/{name}/archive libpod ContainerArchiveLibpod // --- // summary: Copy files from a container // description: Copy a tar archive of files from a container diff --git a/pkg/api/server/register_auth.go b/pkg/api/server/register_auth.go index 56e115e30..c07337653 100644 --- a/pkg/api/server/register_auth.go +++ b/pkg/api/server/register_auth.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerAuthHandlers(r *mux.Router) error { - // swagger:operation POST /auth compat auth + // swagger:operation POST /auth compat SystemAuth // --- // summary: Check auth configuration // tags: diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index 5710605d3..6e64f32b2 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -662,7 +662,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { libpod endpoints */ - // swagger:operation POST /libpod/containers/create libpod libpodCreateContainer + // swagger:operation POST /libpod/containers/create libpod ContainerCreateLibpod // --- // summary: Create a container // tags: @@ -687,7 +687,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/create"), s.APIHandler(libpod.CreateContainer)).Methods(http.MethodPost) - // swagger:operation GET /libpod/containers/json libpod libpodListContainers + // swagger:operation GET /libpod/containers/json libpod ContainerListLibpod // --- // tags: // - containers @@ -752,7 +752,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/json"), s.APIHandler(libpod.ListContainers)).Methods(http.MethodGet) - // swagger:operation POST /libpod/containers/prune libpod libpodPruneContainers + // swagger:operation POST /libpod/containers/prune libpod ContainerPruneLibpod // --- // tags: // - containers @@ -774,7 +774,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost) - // swagger:operation GET /libpod/containers/showmounted libpod libpodShowMountedContainers + // swagger:operation GET /libpod/containers/showmounted libpod ShowMountedContainersLibpod // --- // tags: // - containers @@ -792,7 +792,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/showmounted"), s.APIHandler(libpod.ShowMountedContainers)).Methods(http.MethodGet) - // swagger:operation DELETE /libpod/containers/{name} libpod libpodRemoveContainer + // swagger:operation DELETE /libpod/containers/{name} libpod ContainerDeleteLibpod // --- // tags: // - containers @@ -826,7 +826,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete) - // swagger:operation GET /libpod/containers/{name}/json libpod libpodGetContainer + // swagger:operation GET /libpod/containers/{name}/json libpod ContainerInspectLibpod // --- // tags: // - containers @@ -852,7 +852,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodKillContainer + // swagger:operation POST /libpod/containers/{name}/kill libpod ContainerKillLibpod // --- // tags: // - containers @@ -881,7 +881,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodMountContainer + // swagger:operation POST /libpod/containers/{name}/mount libpod ContainerMountLibpod // --- // tags: // - containers @@ -907,7 +907,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodUnmountContainer + // swagger:operation POST /libpod/containers/{name}/unmount libpod ContainerUnmountLibpod // --- // tags: // - containers @@ -929,7 +929,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodLogsFromContainer + // swagger:operation GET /libpod/containers/{name}/logs libpod ContainerLogsLibpod // --- // tags: // - containers @@ -981,7 +981,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodPauseContainer + // swagger:operation POST /libpod/containers/{name}/pause libpod ContainerPauseLibpod // --- // tags: // - containers @@ -1003,7 +1003,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // "$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 libpodRestartContainer + // swagger:operation POST /libpod/containers/{name}/restart libpod ContainerRestartLibpod // --- // tags: // - containers @@ -1028,7 +1028,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodStartContainer + // swagger:operation POST /libpod/containers/{name}/start libpod ContainerStartLibpod // --- // tags: // - containers @@ -1056,7 +1056,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodStatsContainer + // swagger:operation GET /libpod/containers/{name}/stats libpod ContainerStatsLibpod // --- // tags: // - containers @@ -1083,7 +1083,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet) - // swagger:operation GET /libpod/containers/stats libpod libpodStatsContainers + // swagger:operation GET /libpod/containers/stats libpod ContainersStatsAllLibpod // --- // tags: // - containers @@ -1112,7 +1112,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/stats"), s.APIHandler(libpod.StatsContainer)).Methods(http.MethodGet) - // swagger:operation GET /libpod/containers/{name}/top libpod libpodTopContainer + // swagger:operation GET /libpod/containers/{name}/top libpod ContainerTopLibpod // --- // tags: // - containers @@ -1146,7 +1146,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodUnpauseContainer + // swagger:operation POST /libpod/containers/{name}/unpause libpod ContainerUnpauseLibpod // --- // tags: // - containers @@ -1167,7 +1167,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodWaitContainer + // swagger:operation POST /libpod/containers/{name}/wait libpod ContainerWaitLibpod // --- // tags: // - containers @@ -1215,7 +1215,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodContainerExists + // swagger:operation GET /libpod/containers/{name}/exists libpod ContainerExistsLibpod // --- // tags: // - containers @@ -1237,7 +1237,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodStopContainer + // swagger:operation POST /libpod/containers/{name}/stop libpod ContainerStopLibpod // --- // tags: // - containers @@ -1275,7 +1275,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodAttachContainer + // swagger:operation POST /libpod/containers/{name}/attach libpod ContainerAttachLibpod // --- // tags: // - containers @@ -1330,7 +1330,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodResizeContainer + // swagger:operation POST /libpod/containers/{name}/resize libpod ContainerResizeLibpod // --- // tags: // - containers @@ -1362,7 +1362,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodExportContainer + // swagger:operation GET /libpod/containers/{name}/export libpod ContainerExportLibpod // --- // tags: // - containers @@ -1384,7 +1384,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodCheckpointContainer + // swagger:operation POST /libpod/containers/{name}/checkpoint libpod ContainerCheckpointLibpod // --- // tags: // - containers @@ -1425,7 +1425,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodRestoreContainer + // swagger:operation POST /libpod/containers/{name}/restore libpod ContainerRestoreLibpod // --- // tags: // - containers @@ -1479,8 +1479,8 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/{name}/restore"), s.APIHandler(libpod.Restore)).Methods(http.MethodPost) - // swagger:operation GET /containers/{name}/changes libpod ContainerChanges - // swagger:operation GET /libpod/containers/{name}/changes compat changesContainer + // swagger:operation GET /containers/{name}/changes libpod ContainerChangesLibpod + // swagger:operation GET /libpod/containers/{name}/changes compat ContainerChanges // --- // tags: // - containers @@ -1512,7 +1512,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { 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) - // swagger:operation POST /libpod/containers/{name}/init libpod libpodInitContainer + // swagger:operation POST /libpod/containers/{name}/init libpod ContainerInitLibpod // --- // tags: // - containers @@ -1536,7 +1536,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // 500: // $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 libpodRenameContainer + // swagger:operation POST /libpod/containers/{name}/rename libpod ContainerRenameLibpod // --- // tags: // - containers diff --git a/pkg/api/server/register_events.go b/pkg/api/server/register_events.go index 01fc98377..553f2c0ea 100644 --- a/pkg/api/server/register_events.go +++ b/pkg/api/server/register_events.go @@ -37,7 +37,7 @@ func (s *APIServer) registerEventsHandlers(r *mux.Router) error { 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) - // swagger:operation GET /libpod/events system libpodGetEvents + // swagger:operation GET /libpod/events system SystemEventsLibpod // --- // tags: // - system diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go index 715bdde10..3716ef6a2 100644 --- a/pkg/api/server/register_exec.go +++ b/pkg/api/server/register_exec.go @@ -102,7 +102,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error { // type: boolean // description: Allocate a pseudo-TTY. Presently ignored. // produces: - // - application/json + // - application/octet-stream // responses: // 200: // description: no error @@ -182,7 +182,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error { libpod api follows */ - // swagger:operation POST /libpod/containers/{name}/exec libpod libpodCreateExec + // swagger:operation POST /libpod/containers/{name}/exec libpod ContainerExecLibpod // --- // tags: // - exec @@ -249,7 +249,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error { // 500: // $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 libpodStartExec + // swagger:operation POST /libpod/exec/{id}/start libpod ExecStartLibpod // --- // tags: // - exec @@ -285,7 +285,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error { // 500: // $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 libpodResizeExec + // swagger:operation POST /libpod/exec/{id}/resize libpod ExecResizeLibpod // --- // tags: // - exec @@ -316,7 +316,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error { // 500: // $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 libpodInspectExec + // swagger:operation GET /libpod/exec/{id}/json libpod ExecInspectLibpod // --- // tags: // - exec diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go index abbad1485..208bf668c 100644 --- a/pkg/api/server/register_generate.go +++ b/pkg/api/server/register_generate.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerGenerateHandlers(r *mux.Router) error { - // swagger:operation GET /libpod/generate/{name:.*}/systemd libpod libpodGenerateSystemd + // swagger:operation GET /libpod/generate/{name:.*}/systemd libpod GenerateSystemdLibpod // --- // tags: // - containers @@ -75,7 +75,7 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error { // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/systemd"), s.APIHandler(libpod.GenerateSystemd)).Methods(http.MethodGet) - // swagger:operation GET /libpod/generate/kube libpod libpodGenerateKube + // swagger:operation GET /libpod/generate/kube libpod GenerateKubeLibpod // --- // tags: // - containers diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go index 85f3d720c..e2fd5ac68 100644 --- a/pkg/api/server/register_healthcheck.go +++ b/pkg/api/server/register_healthcheck.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerHealthCheckHandlers(r *mux.Router) error { - // swagger:operation GET /libpod/containers/{name:.*}/healthcheck libpod libpodRunHealthCheck + // swagger:operation GET /libpod/containers/{name:.*}/healthcheck libpod ContainerHealthcheckLibpod // --- // tags: // - containers diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index b0423d200..de8d50cc9 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -19,6 +19,9 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // - images (compat) // summary: Create an image // description: Create an image by either pulling it from a registry or importing it. + // consumes: + // - text/plain + // - application/octet-stream // produces: // - application/json // parameters: @@ -279,7 +282,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // required: true // description: the name or ID of the container // produces: - // - application/json + // - application/x-tar // responses: // 200: // description: no error @@ -664,7 +667,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { libpod endpoints */ - // swagger:operation POST /libpod/images/{name:.*}/push libpod libpodPushImage + // swagger:operation POST /libpod/images/{name:.*}/push libpod ImagePushLibpod // --- // tags: // - images @@ -702,7 +705,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $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 libpodImageExists + // swagger:operation GET /libpod/images/{name:.*}/exists libpod ImageExistsLibpod // --- // tags: // - images @@ -724,7 +727,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $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 libpodImageTree + // swagger:operation GET /libpod/images/{name:.*}/tree libpod ImageTreeLibpod // --- // tags: // - images @@ -750,7 +753,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $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 libpodImageHistory + // swagger:operation GET /libpod/images/{name:.*}/history libpod ImageHistoryLibpod // --- // tags: // - images @@ -772,7 +775,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/{name:.*}/history"), s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet) - // swagger:operation GET /libpod/images/json libpod libpodListImages + // swagger:operation GET /libpod/images/json libpod ImageListLibpod // --- // tags: // - images @@ -803,7 +806,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/json"), s.APIHandler(libpod.GetImages)).Methods(http.MethodGet) - // swagger:operation POST /libpod/images/load libpod libpodImagesLoad + // swagger:operation POST /libpod/images/load libpod ImageLoadLibpod // --- // tags: // - images @@ -828,7 +831,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/load"), s.APIHandler(libpod.ImagesLoad)).Methods(http.MethodPost) - // swagger:operation POST /libpod/images/import libpod libpodImagesImport + // swagger:operation POST /libpod/images/import libpod ImageImportLibpod // --- // tags: // - images @@ -871,7 +874,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/import"), s.APIHandler(libpod.ImagesImport)).Methods(http.MethodPost) - // swagger:operation DELETE /libpod/images/remove libpod libpodImagesRemove + // swagger:operation DELETE /libpod/images/remove libpod ImageDeleteAllLibpod // --- // tags: // - images @@ -903,7 +906,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/remove"), s.APIHandler(libpod.ImagesBatchRemove)).Methods(http.MethodDelete) - // swagger:operation DELETE /libpod/images/{name:.*} libpod libpodRemoveImage + // swagger:operation DELETE /libpod/images/{name:.*} libpod ImageDeleteLibpod // --- // tags: // - images @@ -933,7 +936,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/{name:.*}"), s.APIHandler(libpod.ImagesRemove)).Methods(http.MethodDelete) - // swagger:operation POST /libpod/images/pull libpod libpodImagesPull + // swagger:operation POST /libpod/images/pull libpod ImagePullLibpod // --- // tags: // - images @@ -979,7 +982,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/pull"), s.APIHandler(libpod.ImagesPull)).Methods(http.MethodPost) - // swagger:operation POST /libpod/images/prune libpod libpodPruneImages + // swagger:operation POST /libpod/images/prune libpod ImagePruneLibpod // --- // tags: // - images @@ -1004,7 +1007,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/prune"), s.APIHandler(libpod.PruneImages)).Methods(http.MethodPost) - // swagger:operation GET /libpod/images/search libpod libpodSearchImages + // swagger:operation GET /libpod/images/search libpod ImageSearchLibpod // --- // tags: // - images @@ -1039,7 +1042,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet) - // swagger:operation GET /libpod/images/{name:.*}/get libpod libpodExportImage + // swagger:operation GET /libpod/images/{name:.*}/get libpod ImageGetLibpod // --- // tags: // - images @@ -1060,7 +1063,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // type: boolean // description: use compression on image // produces: - // - application/json + // - application/x-tar // responses: // 200: // description: no error @@ -1072,7 +1075,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/{name:.*}/get"), s.APIHandler(libpod.ExportImage)).Methods(http.MethodGet) - // swagger:operation GET /libpod/images/export libpod libpodExportImages + // swagger:operation GET /libpod/images/export libpod ImageExportLibpod // --- // tags: // - images @@ -1106,7 +1109,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/export"), s.APIHandler(libpod.ExportImages)).Methods(http.MethodGet) - // swagger:operation GET /libpod/images/{name:.*}/json libpod libpodInspectImage + // swagger:operation GET /libpod/images/{name:.*}/json libpod ImageInspectLibpod // --- // tags: // - images @@ -1128,7 +1131,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $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 libpodTagImage + // swagger:operation POST /libpod/images/{name:.*}/tag libpod ImageTagLibpod // --- // tags: // - images @@ -1162,7 +1165,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/images/{name:.*}/tag"), s.APIHandler(compat.TagImage)).Methods(http.MethodPost) - // swagger:operation POST /libpod/commit libpod libpodCommitContainer + // swagger:operation POST /libpod/commit libpod ImageCommitLibpod // --- // tags: // - containers @@ -1214,7 +1217,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/commit"), s.APIHandler(libpod.CommitContainer)).Methods(http.MethodPost) - // swagger:operation POST /libpod/images/{name:.*}/untag libpod libpodUntagImage + // swagger:operation POST /libpod/images/{name:.*}/untag libpod ImageUntagLibpod // --- // tags: // - images @@ -1249,7 +1252,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // $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 libpodChangesImages + // swagger:operation GET /libpod/images/{name}/changes libpod ImageChangesLibpod // --- // tags: // - images @@ -1279,7 +1282,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/images/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet) - // swagger:operation POST /libpod/build libpod libpodBuildImage + // swagger:operation POST /libpod/build libpod ImageBuildLibpod // --- // tags: // - images diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go index ba4f3719c..45185ba3b 100644 --- a/pkg/api/server/register_info.go +++ b/pkg/api/server/register_info.go @@ -25,7 +25,7 @@ func (s *APIServer) registerInfoHandlers(r *mux.Router) error { 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) - // swagger:operation GET /libpod/info libpod libpodGetInfo + // swagger:operation GET /libpod/info libpod SystemInfoLibpod // --- // tags: // - system diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go index adb545b51..ba5577a85 100644 --- a/pkg/api/server/register_manifest.go +++ b/pkg/api/server/register_manifest.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerManifestHandlers(r *mux.Router) error { - // swagger:operation POST /libpod/manifests/create manifests Create + // swagger:operation POST /libpod/manifests/create manifests ManifestCreateLibpod // --- // summary: Create // description: Create a manifest list @@ -39,7 +39,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/manifests/create"), s.APIHandler(libpod.ManifestCreate)).Methods(http.MethodPost) - // swagger:operation GET /libpod/manifests/{name}/exists manifests Exists + // swagger:operation GET /libpod/manifests/{name}/exists manifests ManifestExistsLibpod // --- // summary: Exists // description: Check if manifest list exists @@ -59,7 +59,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/manifests/{name}/exists"), s.APIHandler(libpod.ExistsManifest)).Methods(http.MethodGet) - // swagger:operation GET /libpod/manifests/{name:.*}/json manifests Inspect + // swagger:operation GET /libpod/manifests/{name:.*}/json manifests ManifestInspectLibpod // --- // summary: Inspect // description: Display a manifest list @@ -79,7 +79,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/manifests/{name:.*}/json"), s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet) - // swagger:operation POST /libpod/manifests/{name:.*}/add manifests AddManifest + // swagger:operation POST /libpod/manifests/{name:.*}/add manifests ManifestAddLibpod // --- // summary: Add image // description: Add an image to a manifest list @@ -107,7 +107,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/manifests/{name:.*}/add"), s.APIHandler(libpod.ManifestAdd)).Methods(http.MethodPost) - // swagger:operation DELETE /libpod/manifests/{name:.*} manifests RemoveManifest + // swagger:operation DELETE /libpod/manifests/{name:.*} manifests ManifestDeleteLibpod // --- // summary: Remove // description: Remove an image from a manifest list @@ -134,7 +134,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/manifests/{name:.*}"), s.APIHandler(libpod.ManifestRemove)).Methods(http.MethodDelete) - // swagger:operation POST /libpod/manifests/{name}/push manifests PushManifest + // swagger:operation POST /libpod/manifests/{name}/push manifests ManifestPushLibpod // --- // summary: Push // description: Push a manifest list or image index to a registry diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 48456f3d6..dcec61bef 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -9,19 +9,6 @@ import ( ) func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { - // swagger:operation POST /networks/prune compat NetworkPrune - // --- - // tags: - // - networks (compat) - // Summary: Delete unused networks - // description: Not supported - // produces: - // - application/json - // responses: - // 404: - // $ref: "#/responses/NoSuchNetwork" - r.HandleFunc(VersionedPath("/networks/prune"), compat.UnsupportedHandler).Methods(http.MethodPost) - r.HandleFunc("/networks/prune", compat.UnsupportedHandler).Methods(http.MethodPost) // swagger:operation DELETE /networks/{name} compat NetworkDelete // --- // tags: @@ -172,7 +159,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // $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 compatPruneNetwork + // swagger:operation POST /networks/prune compat NetworkPrune // --- // tags: // - networks (compat) @@ -201,7 +188,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { r.HandleFunc(VersionedPath("/networks/prune"), s.APIHandler(compat.Prune)).Methods(http.MethodPost) r.HandleFunc("/networks/prune", s.APIHandler(compat.Prune)).Methods(http.MethodPost) - // swagger:operation DELETE /libpod/networks/{name} libpod libpodRemoveNetwork + // swagger:operation DELETE /libpod/networks/{name} libpod NetworkDeleteLibpod // --- // tags: // - networks @@ -226,35 +213,8 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // $ref: "#/responses/NoSuchNetwork" // 500: // $ref: "#/responses/InternalError" - - /* - Libpod - */ - r.HandleFunc(VersionedPath("/libpod/networks/{name}"), s.APIHandler(libpod.RemoveNetwork)).Methods(http.MethodDelete) - // swagger:operation GET /libpod/networks/{name}/json libpod libpodInspectNetwork - // --- - // tags: - // - networks - // summary: Inspect a network - // description: Display low level configuration for a CNI network - // parameters: - // - in: path - // name: name - // type: string - // required: true - // description: the name of the network - // produces: - // - application/json - // responses: - // 200: - // $ref: "#/responses/NetworkInspectReport" - // 404: - // $ref: "#/responses/NoSuchNetwork" - // 500: - // $ref: "#/responses/InternalError" - r.HandleFunc(VersionedPath("/libpod/networks/{name}/json"), s.APIHandler(libpod.InspectNetwork)).Methods(http.MethodGet) - // swagger:operation GET /libpod/networks/{name}/exists libpod libpodExistsNetwork + // swagger:operation GET /libpod/networks/{name}/exists libpod NetworkExistsLibpod // --- // tags: // - networks @@ -276,7 +236,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/networks/{name}/exists"), s.APIHandler(libpod.ExistsNetwork)).Methods(http.MethodGet) - // swagger:operation GET /libpod/networks/json libpod libpodListNetwork + // swagger:operation GET /libpod/networks/json libpod NetworkListLibpod // --- // tags: // - networks @@ -301,7 +261,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/networks/json"), s.APIHandler(libpod.ListNetworks)).Methods(http.MethodGet) - // swagger:operation GET /libpod/networks/{name}/json libpod libpodInspectNetwork + // swagger:operation GET /libpod/networks/{name}/json libpod NetworkInspectLibpod // --- // tags: // - networks @@ -324,7 +284,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // $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 libpodCreateNetwork + // swagger:operation POST /libpod/networks/create libpod NetworkCreateLibpod // --- // tags: // - networks @@ -350,7 +310,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/networks/create"), s.APIHandler(libpod.CreateNetwork)).Methods(http.MethodPost) - // swagger:operation POST /libpod/networks/{name}/connect libpod libpodConnectNetwork + // swagger:operation POST /libpod/networks/{name}/connect libpod NetworkConnectLibpod // --- // tags: // - networks @@ -377,7 +337,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $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 libpodDisconnectNetwork + // swagger:operation POST /libpod/networks/{name}/disconnect libpod NetworkDisconnectLibpod // --- // tags: // - networks @@ -404,7 +364,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/networks/{name}/disconnect"), s.APIHandler(compat.Disconnect)).Methods(http.MethodPost) - // swagger:operation POST /libpod/networks/prune libpod libpodPruneNetwork + // swagger:operation POST /libpod/networks/prune libpod NetworkPruneLibpod // --- // tags: // - networks diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go index 1d0876ec1..1222b3dba 100644 --- a/pkg/api/server/register_ping.go +++ b/pkg/api/server/register_ping.go @@ -10,7 +10,7 @@ import ( func (s *APIServer) registerPingHandlers(r *mux.Router) error { r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) r.Handle(VersionedPath("/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) - // swagger:operation GET /libpod/_ping libpod libpodPingGet + // swagger:operation GET /libpod/_ping libpod SystemPing // --- // summary: Ping service // description: | diff --git a/pkg/api/server/register_play.go b/pkg/api/server/register_play.go index dbb13cba3..b9d3349be 100644 --- a/pkg/api/server/register_play.go +++ b/pkg/api/server/register_play.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerPlayHandlers(r *mux.Router) error { - // swagger:operation POST /libpod/play/kube libpod libpodPlayKube + // swagger:operation POST /libpod/play/kube libpod KubePlayLibpod // --- // tags: // - containers diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index d0887aada..23fdd6fb0 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -8,7 +8,7 @@ import ( ) func (s *APIServer) registerPodsHandlers(r *mux.Router) error { - // swagger:operation GET /libpod/pods/json pods ListPods + // swagger:operation GET /libpod/pods/json pods PodListLibpod // --- // summary: List pods // produces: @@ -26,7 +26,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/json"), s.APIHandler(libpod.Pods)).Methods(http.MethodGet) - // swagger:operation POST /libpod/pods/create pods CreatePod + // swagger:operation POST /libpod/pods/create pods PodCreateLibpod // --- // summary: Create a pod // produces: @@ -51,7 +51,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/create"), s.APIHandler(libpod.PodCreate)).Methods(http.MethodPost) - // swagger:operation POST /libpod/pods/prune pods PrunePods + // swagger:operation POST /libpod/pods/prune pods PodPruneLibpod // --- // summary: Prune unused pods // produces: @@ -66,7 +66,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/prune"), s.APIHandler(libpod.PodPrune)).Methods(http.MethodPost) - // swagger:operation DELETE /libpod/pods/{name} pods removePod + // swagger:operation DELETE /libpod/pods/{name} pods PodDeleteLibpod // --- // summary: Remove pod // produces: @@ -91,7 +91,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/{name}"), s.APIHandler(libpod.PodDelete)).Methods(http.MethodDelete) - // swagger:operation GET /libpod/pods/{name}/json pods inspectPod + // swagger:operation GET /libpod/pods/{name}/json pods PodInspectLibpod // --- // summary: Inspect pod // produces: @@ -110,7 +110,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 podExists + // swagger:operation GET /libpod/pods/{name}/exists pods PodExistsLibpod // --- // summary: Pod exists // description: Check if a pod exists by name or ID @@ -130,7 +130,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 killPod + // swagger:operation POST /libpod/pods/{name}/kill pods PodKillLibpod // --- // summary: Kill a pod // produces: @@ -158,7 +158,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 pausePod + // swagger:operation POST /libpod/pods/{name}/pause pods PodPauseLibpod // --- // summary: Pause a pod // description: Pause a pod @@ -180,7 +180,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 restartPod + // swagger:operation POST /libpod/pods/{name}/restart pods PodRestartLibpod // --- // summary: Restart a pod // produces: @@ -201,7 +201,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 startPod + // swagger:operation POST /libpod/pods/{name}/start pods PodStartLibpod // --- // summary: Start a pod // produces: @@ -224,7 +224,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 stopPod + // swagger:operation POST /libpod/pods/{name}/stop pods PodStopLibpod // --- // summary: Stop a pod // produces: @@ -253,7 +253,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 unpausePod + // swagger:operation POST /libpod/pods/{name}/unpause pods PodUnpauseLibpod // --- // summary: Unpause a pod // produces: @@ -274,7 +274,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $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 topPod + // swagger:operation GET /libpod/pods/{name}/top pods PodTopLibpod // --- // summary: List processes // description: List processes running inside a pod @@ -305,7 +305,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/{name}/top"), s.APIHandler(libpod.PodTop)).Methods(http.MethodGet) - // swagger:operation GET /libpod/pods/stats pods statsPod + // swagger:operation GET /libpod/pods/stats pods PodStatsLibpod // --- // tags: // - pods diff --git a/pkg/api/server/register_secrets.go b/pkg/api/server/register_secrets.go index 531623845..ca9790e93 100644 --- a/pkg/api/server/register_secrets.go +++ b/pkg/api/server/register_secrets.go @@ -9,7 +9,7 @@ import ( ) func (s *APIServer) registerSecretHandlers(r *mux.Router) error { - // swagger:operation POST /libpod/secrets/create libpod libpodCreateSecret + // swagger:operation POST /libpod/secrets/create libpod SecretCreateLibpod // --- // tags: // - secrets @@ -38,7 +38,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/secrets/create"), s.APIHandler(libpod.CreateSecret)).Methods(http.MethodPost) - // swagger:operation GET /libpod/secrets/json libpod libpodListSecret + // swagger:operation GET /libpod/secrets/json libpod SecretListLibpod // --- // tags: // - secrets @@ -53,7 +53,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/secrets/json"), s.APIHandler(compat.ListSecrets)).Methods(http.MethodGet) - // swagger:operation GET /libpod/secrets/{name}/json libpod libpodInspectSecret + // swagger:operation GET /libpod/secrets/{name}/json libpod SecretInspectLibpod // --- // tags: // - secrets @@ -74,7 +74,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/secrets/{name}/json"), s.APIHandler(compat.InspectSecret)).Methods(http.MethodGet) - // swagger:operation DELETE /libpod/secrets/{name} libpod libpodRemoveSecret + // swagger:operation DELETE /libpod/secrets/{name} libpod SecretDeleteLibpod // --- // tags: // - secrets @@ -104,7 +104,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { /* * Docker compatibility endpoints */ - // swagger:operation GET /secrets compat ListSecret + // swagger:operation GET /secrets compat SecretList // --- // tags: // - secrets (compat) @@ -120,7 +120,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // "$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 CreateSecret + // swagger:operation POST /secrets/create compat SecretCreate // --- // tags: // - secrets (compat) @@ -143,7 +143,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // "$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 InspectSecret + // swagger:operation GET /secrets/{name} compat SecretInspect // --- // tags: // - secrets (compat) @@ -165,7 +165,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // "$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 RemoveSecret + // swagger:operation DELETE /secrets/{name} compat SecretDelete // --- // tags: // - secrets (compat) diff --git a/pkg/api/server/register_system.go b/pkg/api/server/register_system.go index 7bc16acc0..739daf7a6 100644 --- a/pkg/api/server/register_system.go +++ b/pkg/api/server/register_system.go @@ -9,10 +9,23 @@ import ( ) func (s *APIServer) registerSystemHandlers(r *mux.Router) error { + // swagger:operation GET /system/df compat SystemDataUsage + // --- + // tags: + // - system (compat) + // summary: Show disk usage + // description: Return information about disk usage for containers, images, and volumes + // produces: + // - application/json + // responses: + // 200: + // $ref: '#/responses/SystemDiskUse' + // 500: + // $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) - // swagger:operation POST /libpod/system/prune libpod pruneSystem + // swagger:operation POST /libpod/system/prune libpod SystemPruneLibpod // --- // tags: // - system @@ -27,7 +40,7 @@ func (s *APIServer) registerSystemHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/system/prune"), s.APIHandler(libpod.SystemPrune)).Methods(http.MethodPost) - // swagger:operation GET /libpod/system/df libpod df + // swagger:operation GET /libpod/system/df libpod SystemDataUsageLibpod // --- // tags: // - system diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go index 71600e30d..462edf4ee 100644 --- a/pkg/api/server/register_version.go +++ b/pkg/api/server/register_version.go @@ -20,7 +20,7 @@ func (s *APIServer) registerVersionHandlers(r *mux.Router) error { // $ref: "#/responses/Version" r.Handle("/version", s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) r.Handle(VersionedPath("/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet) - // swagger:operation GET /libpod/version libpod SystemVersion + // swagger:operation GET /libpod/version libpod SystemVersionLibpod // --- // summary: Component Version information // tags: diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index f100587b9..e5d6cf195 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -9,7 +9,7 @@ import ( ) func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { - // swagger:operation POST /libpod/volumes/create libpod libpodCreateVolume + // swagger:operation POST /libpod/volumes/create libpod VolumeCreateLibpod // --- // tags: // - volumes @@ -28,7 +28,7 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/volumes/create"), s.APIHandler(libpod.CreateVolume)).Methods(http.MethodPost) - // swagger:operation GET /libpod/volumes/{name}/exists libpod libpodExistsVolume + // swagger:operation GET /libpod/volumes/{name}/exists libpod VolumeExistsLibpod // --- // tags: // - volumes @@ -50,7 +50,7 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // 500: // $ref: '#/responses/InternalError' r.Handle(VersionedPath("/libpod/volumes/{name}/exists"), s.APIHandler(libpod.ExistsVolume)).Methods(http.MethodGet) - // swagger:operation GET /libpod/volumes/json libpod libpodListVolumes + // swagger:operation GET /libpod/volumes/json libpod VolumeListLibpod // --- // tags: // - volumes @@ -74,7 +74,7 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/volumes/json"), s.APIHandler(libpod.ListVolumes)).Methods(http.MethodGet) - // swagger:operation POST /libpod/volumes/prune libpod libpodPruneVolumes + // swagger:operation POST /libpod/volumes/prune libpod VolumePruneLibpod // --- // tags: // - volumes @@ -95,7 +95,7 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/InternalError" r.Handle(VersionedPath("/libpod/volumes/prune"), s.APIHandler(libpod.PruneVolumes)).Methods(http.MethodPost) - // swagger:operation GET /libpod/volumes/{name}/json libpod libpodInspectVolume + // swagger:operation GET /libpod/volumes/{name}/json libpod VolumeInspectLibpod // --- // tags: // - volumes @@ -116,7 +116,7 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // '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 libpodRemoveVolume + // swagger:operation DELETE /libpod/volumes/{name} libpod VolumeDeleteLibpod // --- // tags: // - volumes diff --git a/pkg/api/tags.yaml b/pkg/api/tags.yaml index bb56098eb..ae29c39a6 100644 --- a/pkg/api/tags.yaml +++ b/pkg/api/tags.yaml @@ -24,7 +24,7 @@ tags: - name: images (compat) description: Actions related to images for the compatibility endpoints - name: networks (compat) - description: Actions related to compatibility networks + description: Actions related to networks for the compatibility endpoints - name: volumes (compat) description: Actions related to volumes for the compatibility endpoints - name: secrets (compat) |