Move operationIds to swagger:operation line

Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
This commit is contained in:
Tom Deseyn
2021-02-03 14:22:26 +01:00
committed by Jhon Honce
parent 1214b1a38b
commit 5cbda3b789
9 changed files with 55 additions and 110 deletions

View File

@ -8,10 +8,9 @@ import (
) )
func (s *APIServer) registerArchiveHandlers(r *mux.Router) error { func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// swagger:operation PUT /containers/{name}/archive compat putArchive // swagger:operation PUT /containers/{name}/archive compat PutContainerArchive
// --- // ---
// summary: Put files into a container // summary: Put files into a container
// operationId: PutContainerArchive
// description: Put a tar archive of files into a container // description: Put a tar archive of files into a container
// tags: // tags:
// - containers (compat) // - containers (compat)
@ -53,10 +52,9 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// 500: // 500:
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
// swagger:operation GET /containers/{name}/archive compat getArchive // swagger:operation GET /containers/{name}/archive compat ContainerArchive
// --- // ---
// summary: Get files from a container // summary: Get files from a container
// operationId: ContainerArchive
// description: Get a tar archive of files from a container // description: Get a tar archive of files from a container
// tags: // tags:
// - containers (compat) // - containers (compat)

View File

@ -9,10 +9,9 @@ import (
) )
func (s *APIServer) registerContainersHandlers(r *mux.Router) error { func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// swagger:operation POST /containers/create compat createContainer // swagger:operation POST /containers/create compat ContainerCreate
// --- // ---
// summary: Create a container // summary: Create a container
// operationId: ContainerCreate
// tags: // tags:
// - containers (compat) // - containers (compat)
// produces: // produces:
@ -36,12 +35,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/create"), s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost) r.HandleFunc(VersionedPath("/containers/create"), s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/create", s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/create", s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
// swagger:operation GET /containers/json compat listContainers // swagger:operation GET /containers/json compat ContainerList
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: List containers // summary: List containers
// operationId: ContainerList
// description: Returns a list of containers // description: Returns a list of containers
// parameters: // parameters:
// - in: query // - in: query
@ -94,12 +92,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/json"), s.APIHandler(compat.ListContainers)).Methods(http.MethodGet) r.HandleFunc(VersionedPath("/containers/json"), s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/json", s.APIHandler(compat.ListContainers)).Methods(http.MethodGet) r.HandleFunc("/containers/json", s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
// swagger:operation POST /containers/prune compat pruneContainers // swagger:operation POST /containers/prune compat ContainerPrune
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Delete stopped containers // summary: Delete stopped containers
// operationId: ContainerPrune
// description: Remove containers not in use // description: Remove containers not in use
// parameters: // parameters:
// - in: query // - in: query
@ -119,12 +116,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost) r.HandleFunc(VersionedPath("/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/prune", s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost) r.HandleFunc("/containers/prune", s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
// swagger:operation DELETE /containers/{name} compat removeContainer // swagger:operation DELETE /containers/{name} compat ContainerDelete
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Remove a container // summary: Remove a container
// operationId: ContainerDelete
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -161,12 +157,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete) r.HandleFunc(VersionedPath("/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}", s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete) r.HandleFunc("/containers/{name}", s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
// swagger:operation GET /containers/{name}/json compat getContainer // swagger:operation GET /containers/{name}/json compat ContainerInspect
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Inspect container // summary: Inspect container
// operationId: ContainerInspect
// description: Return low-level information about a container. // description: Return low-level information about a container.
// parameters: // parameters:
// - in: path // - in: path
@ -191,12 +186,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/json"), s.APIHandler(compat.GetContainer)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/json", s.APIHandler(compat.GetContainer)).Methods(http.MethodGet) r.HandleFunc("/containers/{name}/json", s.APIHandler(compat.GetContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/kill compat killContainer // swagger:operation POST /containers/{name}/kill compat ContainerKill
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Kill container // summary: Kill container
// operationId: ContainerKill
// description: Signal to send to the container as an integer or string (e.g. SIGINT) // description: Signal to send to the container as an integer or string (e.g. SIGINT)
// parameters: // parameters:
// - in: path // - in: path
@ -229,12 +223,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/kill"), s.APIHandler(compat.KillContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/kill", s.APIHandler(compat.KillContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/kill", s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/logs compat logsFromContainer // swagger:operation GET /containers/{name}/logs compat ContainerLogs
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Get container logs // summary: Get container logs
// operationId: ContainerLogs
// description: Get stdout and stderr logs from a container. // description: Get stdout and stderr logs from a container.
// parameters: // parameters:
// - in: path // - in: path
@ -284,12 +277,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/logs"), s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/logs", s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet) r.HandleFunc("/containers/{name}/logs", s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/pause compat pauseContainer // swagger:operation POST /containers/{name}/pause compat ContainerPause
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Pause container // summary: Pause container
// operationId: ContainerPause
// description: Use the cgroups freezer to suspend all processes in a container. // description: Use the cgroups freezer to suspend all processes in a container.
// parameters: // parameters:
// - in: path // - in: path
@ -309,12 +301,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/pause", s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/pause", s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/restart compat restartContainer // swagger:operation POST /containers/{name}/restart compat ContainerRestart
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Restart container // summary: Restart container
// operationId: ContainerRestart
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -337,12 +328,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/restart"), s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/restart", s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/restart", s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/start compat startContainer // swagger:operation POST /containers/{name}/start compat ContainerStart
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Start a container // summary: Start a container
// operationId: ContainerStart
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -368,12 +358,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/start"), s.APIHandler(compat.StartContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/start", s.APIHandler(compat.StartContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/start", s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/stats compat statsContainer // swagger:operation GET /containers/{name}/stats compat ContainerStats
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Get stats for a container // summary: Get stats for a container
// operationId: ContainerStats
// description: This returns a live stream of a containers resource usage statistics. // description: This returns a live stream of a containers resource usage statistics.
// parameters: // parameters:
// - in: path // - in: path
@ -398,12 +387,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/stats", s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet) r.HandleFunc("/containers/{name}/stats", s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/stop compat stopContainer // swagger:operation POST /containers/{name}/stop compat ContainerStop
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Stop a container // summary: Stop a container
// operationId: ContainerStop
// description: Stop a container // description: Stop a container
// parameters: // parameters:
// - in: path // - in: path
@ -429,12 +417,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/stop"), s.APIHandler(compat.StopContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/stop", s.APIHandler(compat.StopContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/stop", s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/top compat topContainer // swagger:operation GET /containers/{name}/top compat ContainerTop
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: List processes running inside a container // summary: List processes running inside a container
// operationId: ContainerTop
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -457,12 +444,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/top"), s.APIHandler(compat.TopContainer)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/top", s.APIHandler(compat.TopContainer)).Methods(http.MethodGet) r.HandleFunc("/containers/{name}/top", s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/unpause compat unpauseContainer // swagger:operation POST /containers/{name}/unpause compat ContainerUnpause
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Unpause container // summary: Unpause container
// operationId: ContainerUnpause
// description: Resume a paused container // description: Resume a paused container
// parameters: // parameters:
// - in: path // - in: path
@ -482,12 +468,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/unpause"), s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/unpause", s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/unpause", s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/wait compat waitContainer // swagger:operation POST /containers/{name}/wait compat ContainerWait
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Wait on a container // summary: Wait on a container
// operationId: ContainerWait
// description: Block until a container stops or given condition is met. // description: Block until a container stops or given condition is met.
// parameters: // parameters:
// - in: path // - in: path
@ -523,12 +508,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/wait"), s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/wait", s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/wait", s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/attach compat attachContainer // swagger:operation POST /containers/{name}/attach compat ContainerAttach
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Attach to a container // summary: Attach to a container
// operationId: ContainerAttach
// description: Hijacks the connection to forward the container's standard streams to the client. // description: Hijacks the connection to forward the container's standard streams to the client.
// parameters: // parameters:
// - in: path // - in: path
@ -581,12 +565,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/attach"), s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/attach", s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/attach", s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/resize compat resizeContainer // swagger:operation POST /containers/{name}/resize compat ContainerResize
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Resize a container's TTY // summary: Resize a container's TTY
// operationId: ContainerResize
// description: Resize the terminal attached to a container (for use with Attach). // description: Resize the terminal attached to a container (for use with Attach).
// parameters: // parameters:
// - in: path // - in: path
@ -621,12 +604,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost) r.HandleFunc("/containers/{name}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/export compat exportContainer // swagger:operation GET /containers/{name}/export compat ContainerExport
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Export a container // summary: Export a container
// operationId: ContainerExport
// description: Export the contents of a container as a tarball. // description: Export the contents of a container as a tarball.
// parameters: // parameters:
// - in: path // - in: path
@ -645,12 +627,11 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet) 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) r.HandleFunc("/containers/{name}/export", s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
// swagger:operation POST /containers/{name}/rename compat renameContainer // swagger:operation POST /containers/{name}/rename compat ContainerRename
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: Rename an existing container // summary: Rename an existing container
// operationId: ContainerRename
// description: Change the name of an existing container. // description: Change the name of an existing container.
// parameters: // parameters:
// - in: path // - in: path
@ -1487,14 +1468,13 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 500: // 500:
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/restore"), s.APIHandler(libpod.Restore)).Methods(http.MethodPost) r.HandleFunc(VersionedPath("/libpod/containers/{name}/restore"), s.APIHandler(libpod.Restore)).Methods(http.MethodPost)
// swagger:operation GET /containers/{name}/changes libpod libpodChangesContainer // swagger:operation GET /containers/{name}/changes libpod ContainerChanges
// swagger:operation GET /libpod/containers/{name}/changes compat changesContainer // swagger:operation GET /libpod/containers/{name}/changes compat changesContainer
// --- // ---
// tags: // tags:
// - containers // - containers
// - containers (compat) // - containers (compat)
// summary: Report on changes to container's filesystem; adds, deletes or modifications. // summary: Report on changes to container's filesystem; adds, deletes or modifications.
// operationId: ContainerChanges
// description: | // description: |
// Returns which files in a container's filesystem have been added, deleted, or modified. The Kind of modification can be one of: // Returns which files in a container's filesystem have been added, deleted, or modified. The Kind of modification can be one of:
// //

View File

@ -8,12 +8,11 @@ import (
) )
func (s *APIServer) registerEventsHandlers(r *mux.Router) error { func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
// swagger:operation GET /events system getEvents // swagger:operation GET /events system SystemEvents
// --- // ---
// tags: // tags:
// - system (compat) // - system (compat)
// summary: Get events // summary: Get events
// operationId: SystemEvents
// description: Returns events filtered on query parameters // description: Returns events filtered on query parameters
// produces: // produces:
// - application/json // - application/json

View File

@ -8,12 +8,11 @@ import (
) )
func (s *APIServer) registerExecHandlers(r *mux.Router) error { func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// swagger:operation POST /containers/{name}/exec compat createExec // swagger:operation POST /containers/{name}/exec compat ContainerExec
// --- // ---
// tags: // tags:
// - exec (compat) // - exec (compat)
// summary: Create an exec instance // summary: Create an exec instance
// operationId: ContainerExec
// description: Create an exec session to run a command inside a running container. Exec sessions will be automatically removed 5 minutes after they exit. // description: Create an exec session to run a command inside a running container. Exec sessions will be automatically removed 5 minutes after they exit.
// parameters: // parameters:
// - in: path // - in: path
@ -78,12 +77,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/containers/{name}/exec"), s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/containers/{name}/exec", s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost) r.Handle("/containers/{name}/exec", s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// swagger:operation POST /exec/{id}/start compat startExec // swagger:operation POST /exec/{id}/start compat ExecStart
// --- // ---
// tags: // tags:
// - exec (compat) // - exec (compat)
// summary: Start an exec instance // summary: Start an exec instance
// operationId: ExecStart
// description: Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. // description: Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.
// parameters: // parameters:
// - in: path // - in: path
@ -117,12 +115,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/exec/{id}/start"), s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/start", s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost) r.Handle("/exec/{id}/start", s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// swagger:operation POST /exec/{id}/resize compat resizeExec // swagger:operation POST /exec/{id}/resize compat ExecResize
// --- // ---
// tags: // tags:
// - exec (compat) // - exec (compat)
// summary: Resize an exec instance // summary: Resize an exec instance
// operationId: ExecResize
// description: | // description: |
// Resize the TTY session used by an exec instance. This endpoint only works if tty was specified as part of creating and starting the exec instance. // Resize the TTY session used by an exec instance. This endpoint only works if tty was specified as part of creating and starting the exec instance.
// parameters: // parameters:
@ -156,12 +153,11 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/exec/{id}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost) r.Handle("/exec/{id}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /exec/{id}/json compat inspectExec // swagger:operation GET /exec/{id}/json compat ExecInspect
// --- // ---
// tags: // tags:
// - exec (compat) // - exec (compat)
// summary: Inspect an exec instance // summary: Inspect an exec instance
// operationId: ExecInspect
// description: Return low-level information about an exec instance. // description: Return low-level information about an exec instance.
// parameters: // parameters:
// - in: path // - in: path

View File

@ -13,12 +13,11 @@ import (
// * /images/create is missing the "message" and "platform" parameters // * /images/create is missing the "message" and "platform" parameters
func (s *APIServer) registerImagesHandlers(r *mux.Router) error { func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// swagger:operation POST /images/create compat createImage // swagger:operation POST /images/create compat ImageCreate
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Create an image // summary: Create an image
// operationId: ImageCreate
// description: Create an image by either pulling it from a registry or importing it. // description: Create an image by either pulling it from a registry or importing it.
// produces: // produces:
// - application/json // - application/json
@ -57,12 +56,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/create"), s.APIHandler(compat.CreateImageFromSrc)).Methods(http.MethodPost).Queries("fromSrc", "{fromSrc}") r.Handle(VersionedPath("/images/create"), s.APIHandler(compat.CreateImageFromSrc)).Methods(http.MethodPost).Queries("fromSrc", "{fromSrc}")
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/create", s.APIHandler(compat.CreateImageFromSrc)).Methods(http.MethodPost).Queries("fromSrc", "{fromSrc}") r.Handle("/images/create", s.APIHandler(compat.CreateImageFromSrc)).Methods(http.MethodPost).Queries("fromSrc", "{fromSrc}")
// swagger:operation GET /images/json compat listImages // swagger:operation GET /images/json compat ImageList
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: List Images // summary: List Images
// operationId: ImageList
// description: Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. // description: Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.
// parameters: // parameters:
// - name: all // - name: all
@ -95,12 +93,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/json"), s.APIHandler(compat.GetImages)).Methods(http.MethodGet) r.Handle(VersionedPath("/images/json"), s.APIHandler(compat.GetImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/json", s.APIHandler(compat.GetImages)).Methods(http.MethodGet) r.Handle("/images/json", s.APIHandler(compat.GetImages)).Methods(http.MethodGet)
// swagger:operation POST /images/load compat importImage // swagger:operation POST /images/load compat ImageLoad
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Import image // summary: Import image
// operationId: ImageLoad
// description: Load a set of images and tags into a repository. // description: Load a set of images and tags into a repository.
// parameters: // parameters:
// - in: query // - in: query
@ -122,12 +119,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/load"), s.APIHandler(compat.LoadImages)).Methods(http.MethodPost) r.Handle(VersionedPath("/images/load"), s.APIHandler(compat.LoadImages)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/load", s.APIHandler(compat.LoadImages)).Methods(http.MethodPost) r.Handle("/images/load", s.APIHandler(compat.LoadImages)).Methods(http.MethodPost)
// swagger:operation POST /images/prune compat pruneImages // swagger:operation POST /images/prune compat ImagePrune
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Prune unused images // summary: Prune unused images
// operationId: ImagePrune
// description: Remove images from local storage that are not being used by a container // description: Remove images from local storage that are not being used by a container
// parameters: // parameters:
// - in: query // - in: query
@ -150,12 +146,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/prune"), s.APIHandler(compat.PruneImages)).Methods(http.MethodPost) r.Handle(VersionedPath("/images/prune"), s.APIHandler(compat.PruneImages)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/prune", s.APIHandler(compat.PruneImages)).Methods(http.MethodPost) r.Handle("/images/prune", s.APIHandler(compat.PruneImages)).Methods(http.MethodPost)
// swagger:operation GET /images/search compat searchImages // swagger:operation GET /images/search compat ImageSearch
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Search images // summary: Search images
// operationId: ImageSearch
// description: Search registries for an image // description: Search registries for an image
// parameters: // parameters:
// - in: query // - in: query
@ -190,12 +185,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet) r.Handle(VersionedPath("/images/search"), s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/search", s.APIHandler(compat.SearchImages)).Methods(http.MethodGet) r.Handle("/images/search", s.APIHandler(compat.SearchImages)).Methods(http.MethodGet)
// swagger:operation DELETE /images/{name:.*} compat removeImage // swagger:operation DELETE /images/{name:.*} compat ImageDelete
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Remove Image // summary: Remove Image
// operationId: ImageDelete
// description: Delete an image from local storage // description: Delete an image from local storage
// parameters: // parameters:
// - in: path // - in: path
@ -225,12 +219,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}"), s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete) r.Handle(VersionedPath("/images/{name:.*}"), s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}", s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete) r.Handle("/images/{name:.*}", s.APIHandler(compat.RemoveImage)).Methods(http.MethodDelete)
// swagger:operation POST /images/{name:.*}/push compat pushImage // swagger:operation POST /images/{name:.*}/push compat ImagePush
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Push Image // summary: Push Image
// operationId: ImagePush
// description: Push an image to a container registry // description: Push an image to a container registry
// parameters: // parameters:
// - in: path // - in: path
@ -273,12 +266,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/push"), s.APIHandler(compat.PushImage)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/push", s.APIHandler(compat.PushImage)).Methods(http.MethodPost) r.Handle("/images/{name:.*}/push", s.APIHandler(compat.PushImage)).Methods(http.MethodPost)
// swagger:operation GET /images/{name:.*}/get compat exportImage // swagger:operation GET /images/{name:.*}/get compat ImageGet
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Export an image // summary: Export an image
// operationId: ImageGet
// description: Export an image in tarball format // description: Export an image in tarball format
// parameters: // parameters:
// - in: path // - in: path
@ -299,12 +291,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/get"), s.APIHandler(compat.ExportImage)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/get", s.APIHandler(compat.ExportImage)).Methods(http.MethodGet) r.Handle("/images/{name:.*}/get", s.APIHandler(compat.ExportImage)).Methods(http.MethodGet)
// swagger:operation GET /images/get compat get // swagger:operation GET /images/get compat ImageGetAll
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Export several images // summary: Export several images
// operationId: ImageGetAll
// description: Get a tarball containing all images and metadata for several image repositories // description: Get a tarball containing all images and metadata for several image repositories
// parameters: // parameters:
// - in: query // - in: query
@ -325,12 +316,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/get"), s.APIHandler(compat.ExportImages)).Methods(http.MethodGet) r.Handle(VersionedPath("/images/get"), s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/images/get", s.APIHandler(compat.ExportImages)).Methods(http.MethodGet) r.Handle("/images/get", s.APIHandler(compat.ExportImages)).Methods(http.MethodGet)
// swagger:operation GET /images/{name:.*}/history compat imageHistory // swagger:operation GET /images/{name:.*}/history compat ImageHistory
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: History of an image // summary: History of an image
// operationId: ImageHistory
// description: Return parent layers of an image. // description: Return parent layers of an image.
// parameters: // parameters:
// - in: path // - in: path
@ -350,12 +340,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/history"), s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/history", s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet) r.Handle("/images/{name:.*}/history", s.APIHandler(compat.HistoryImage)).Methods(http.MethodGet)
// swagger:operation GET /images/{name:.*}/json compat inspectImage // swagger:operation GET /images/{name:.*}/json compat ImageInspect
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Inspect an image // summary: Inspect an image
// operationId: ImageInspect
// description: Return low-level information about an image. // description: Return low-level information about an image.
// parameters: // parameters:
// - in: path // - in: path
@ -375,12 +364,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/json"), s.APIHandler(compat.GetImage)).Methods(http.MethodGet) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/json", s.APIHandler(compat.GetImage)).Methods(http.MethodGet) r.Handle("/images/{name:.*}/json", s.APIHandler(compat.GetImage)).Methods(http.MethodGet)
// swagger:operation POST /images/{name:.*}/tag compat tagImage // swagger:operation POST /images/{name:.*}/tag compat ImageTag
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Tag an image // summary: Tag an image
// operationId: ImageTag
// description: Tag an image so that it becomes part of a repository. // description: Tag an image so that it becomes part of a repository.
// parameters: // parameters:
// - in: path // - in: path
@ -412,12 +400,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/images/{name:.*}/tag"), s.APIHandler(compat.TagImage)).Methods(http.MethodPost) 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 // Added non version path to URI to support docker non versioned paths
r.Handle("/images/{name:.*}/tag", s.APIHandler(compat.TagImage)).Methods(http.MethodPost) r.Handle("/images/{name:.*}/tag", s.APIHandler(compat.TagImage)).Methods(http.MethodPost)
// swagger:operation POST /commit compat commitContainer // swagger:operation POST /commit compat ImageCommit
// --- // ---
// tags: // tags:
// - containers (compat) // - containers (compat)
// summary: New Image // summary: New Image
// operationId: ImageCommit
// description: Create a new image from a container // description: Create a new image from a container
// parameters: // parameters:
// - in: query // - in: query
@ -461,12 +448,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// Added non version path to URI to support docker non versioned paths // Added non version path to URI to support docker non versioned paths
r.Handle("/commit", s.APIHandler(compat.CommitContainer)).Methods(http.MethodPost) r.Handle("/commit", s.APIHandler(compat.CommitContainer)).Methods(http.MethodPost)
// swagger:operation POST /build compat buildImage // swagger:operation POST /build compat ImageBuild
// --- // ---
// tags: // tags:
// - images (compat) // - images (compat)
// summary: Create image // summary: Create image
// operationId: ImageBuild
// description: Build an image from the given Dockerfile(s) // description: Build an image from the given Dockerfile(s)
// parameters: // parameters:
// - in: query // - in: query

View File

@ -9,12 +9,11 @@ import (
) )
func (s *APIServer) registerInfoHandlers(r *mux.Router) error { func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
// swagger:operation GET /info compat getInfo // swagger:operation GET /info compat SystemInfo
// --- // ---
// tags: // tags:
// - system (compat) // - system (compat)
// summary: Get info // summary: Get info
// operationId: SystemInfo
// description: Returns information on the system and libpod configuration // description: Returns information on the system and libpod configuration
// produces: // produces:
// - application/json // - application/json

View File

@ -9,12 +9,11 @@ import (
) )
func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// swagger:operation POST /networks/prune compat compatPruneNetwork // swagger:operation POST /networks/prune compat NetworkPrune
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// Summary: Delete unused networks // Summary: Delete unused networks
// operationId: NetworkPrune
// description: Not supported // description: Not supported
// produces: // produces:
// - application/json // - application/json
@ -23,12 +22,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/NoSuchNetwork" // $ref: "#/responses/NoSuchNetwork"
r.HandleFunc(VersionedPath("/networks/prune"), compat.UnsupportedHandler).Methods(http.MethodPost) r.HandleFunc(VersionedPath("/networks/prune"), compat.UnsupportedHandler).Methods(http.MethodPost)
r.HandleFunc("/networks/prune", compat.UnsupportedHandler).Methods(http.MethodPost) r.HandleFunc("/networks/prune", compat.UnsupportedHandler).Methods(http.MethodPost)
// swagger:operation DELETE /networks/{name} compat compatRemoveNetwork // swagger:operation DELETE /networks/{name} compat NetworkDelete
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: Remove a network // summary: Remove a network
// operationId: NetworkDelete
// description: Remove a network // description: Remove a network
// parameters: // parameters:
// - in: path // - in: path
@ -47,12 +45,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.RemoveNetwork)).Methods(http.MethodDelete) r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.RemoveNetwork)).Methods(http.MethodDelete)
r.HandleFunc("/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 compatInspectNetwork // swagger:operation GET /networks/{name} compat NetworkInspect
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: Inspect a network // summary: Inspect a network
// operationId: NetworkInspect
// description: Display low level configuration network // description: Display low level configuration network
// parameters: // parameters:
// - in: path // - in: path
@ -71,12 +68,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.InspectNetwork)).Methods(http.MethodGet) r.HandleFunc(VersionedPath("/networks/{name}"), s.APIHandler(compat.InspectNetwork)).Methods(http.MethodGet)
r.HandleFunc("/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 compatListNetwork // swagger:operation GET /networks compat NetworkList
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: List networks // summary: List networks
// operationId: NetworkList
// description: Display summary of network configurations // description: Display summary of network configurations
// parameters: // parameters:
// - in: query // - in: query
@ -97,12 +93,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/networks"), s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet) r.HandleFunc(VersionedPath("/networks"), s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet)
r.HandleFunc("/networks", s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet) r.HandleFunc("/networks", s.APIHandler(compat.ListNetworks)).Methods(http.MethodGet)
// swagger:operation POST /networks/create compat compatCreateNetwork // swagger:operation POST /networks/create compat NetworkCreate
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: Create network // summary: Create network
// operationId: NetworkCreate
// description: Create a network configuration // description: Create a network configuration
// produces: // produces:
// - application/json // - application/json
@ -121,12 +116,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/networks/create"), s.APIHandler(compat.CreateNetwork)).Methods(http.MethodPost) r.HandleFunc(VersionedPath("/networks/create"), s.APIHandler(compat.CreateNetwork)).Methods(http.MethodPost)
r.HandleFunc("/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 compatConnectNetwork // swagger:operation POST /networks/{name}/connect compat NetworkConnect
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: Connect container to network // summary: Connect container to network
// operationId: NetworkConnect
// description: Connect a container to a network. This endpoint is current a no-op // description: Connect a container to a network. This endpoint is current a no-op
// produces: // produces:
// - application/json // - application/json
@ -150,12 +144,11 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError" // $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/networks/{name}/connect"), s.APIHandler(compat.Connect)).Methods(http.MethodPost) 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) r.HandleFunc("/networks/{name}/connect", s.APIHandler(compat.Connect)).Methods(http.MethodPost)
// swagger:operation POST /networks/{name}/disconnect compat compatDisconnectNetwork // swagger:operation POST /networks/{name}/disconnect compat NetworkDisconnect
// --- // ---
// tags: // tags:
// - networks (compat) // - networks (compat)
// summary: Disconnect container from network // summary: Disconnect container from network
// operationId: NetworkDisconnect
// description: Disconnect a container from a network. This endpoint is current a no-op // description: Disconnect a container from a network. This endpoint is current a no-op
// produces: // produces:
// - application/json // - application/json

View File

@ -8,10 +8,9 @@ import (
) )
func (s *APIServer) registerVersionHandlers(r *mux.Router) error { func (s *APIServer) registerVersionHandlers(r *mux.Router) error {
// swagger:operation GET /version compat CompatSystemVersion // swagger:operation GET /version compat SystemVersion
// --- // ---
// summary: Component Version information // summary: Component Version information
// operationId: SystemVersion
// tags: // tags:
// - system (compat) // - system (compat)
// produces: // produces:

View File

@ -140,12 +140,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
* Docker compatibility endpoints * Docker compatibility endpoints
*/ */
// swagger:operation GET /volumes compat listVolumes // swagger:operation GET /volumes compat VolumeList
// --- // ---
// tags: // tags:
// - volumes (compat) // - volumes (compat)
// summary: List volumes // summary: List volumes
// operationId: VolumeList
// description: Returns a list of volume // description: Returns a list of volume
// produces: // produces:
// - application/json // - application/json
@ -169,12 +168,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/volumes"), s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet) r.Handle(VersionedPath("/volumes"), s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet)
r.Handle("/volumes", s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet) r.Handle("/volumes", s.APIHandler(compat.ListVolumes)).Methods(http.MethodGet)
// swagger:operation POST /volumes/create compat createVolume // swagger:operation POST /volumes/create compat VolumeCreate
// --- // ---
// tags: // tags:
// - volumes (compat) // - volumes (compat)
// summary: Create a volume // summary: Create a volume
// operationId: VolumeCreate
// parameters: // parameters:
// - in: body // - in: body
// name: create // name: create
@ -193,12 +191,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/volumes/create"), s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost) r.Handle(VersionedPath("/volumes/create"), s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost)
r.Handle("/volumes/create", s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost) r.Handle("/volumes/create", s.APIHandler(compat.CreateVolume)).Methods(http.MethodPost)
// swagger:operation GET /volumes/{name} compat inspectVolume // swagger:operation GET /volumes/{name} compat VolumeInspect
// --- // ---
// tags: // tags:
// - volumes (compat) // - volumes (compat)
// summary: Inspect volume // summary: Inspect volume
// operationId: VolumeInspect
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -217,12 +214,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet) r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet)
r.Handle("/volumes/{name}", s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet) r.Handle("/volumes/{name}", s.APIHandler(compat.InspectVolume)).Methods(http.MethodGet)
// swagger:operation DELETE /volumes/{name} compat removeVolume // swagger:operation DELETE /volumes/{name} compat VolumeDelete
// --- // ---
// tags: // tags:
// - volumes (compat) // - volumes (compat)
// summary: Remove volume // summary: Remove volume
// operationId: VolumeDelete
// parameters: // parameters:
// - in: path // - in: path
// name: name // name: name
@ -250,12 +246,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete) r.Handle(VersionedPath("/volumes/{name}"), s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete)
r.Handle("/volumes/{name}", s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete) r.Handle("/volumes/{name}", s.APIHandler(compat.RemoveVolume)).Methods(http.MethodDelete)
// swagger:operation POST /volumes/prune compat pruneVolumes // swagger:operation POST /volumes/prune compat VolumePrune
// --- // ---
// tags: // tags:
// - volumes (compat) // - volumes (compat)
// summary: Prune volumes // summary: Prune volumes
// operationId: VolumePrune
// produces: // produces:
// - application/json // - application/json
// parameters: // parameters: