github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/api/server/register_containers.go (about)

     1  package server
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/hanks177/podman/v4/pkg/api/handlers/compat"
     7  	"github.com/hanks177/podman/v4/pkg/api/handlers/libpod"
     8  	"github.com/gorilla/mux"
     9  )
    10  
    11  func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
    12  	// swagger:operation POST /containers/create compat ContainerCreate
    13  	// ---
    14  	//   summary: Create a container
    15  	//   tags:
    16  	//    - containers (compat)
    17  	//   produces:
    18  	//   - application/json
    19  	//   parameters:
    20  	//    - in: query
    21  	//      name: name
    22  	//      type: string
    23  	//      description: container name
    24  	//    - in: body
    25  	//      name: body
    26  	//      description: Container to create
    27  	//      schema:
    28  	//        $ref: "#/definitions/CreateContainerConfig"
    29  	//      required: true
    30  	//   responses:
    31  	//     201:
    32  	//       $ref: "#/responses/containerCreateResponse"
    33  	//     400:
    34  	//       $ref: "#/responses/badParamError"
    35  	//     404:
    36  	//       $ref: "#/responses/containerNotFound"
    37  	//     409:
    38  	//       $ref: "#/responses/conflictError"
    39  	//     500:
    40  	//       $ref: "#/responses/internalError"
    41  	r.HandleFunc(VersionedPath("/containers/create"), s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
    42  	// Added non version path to URI to support docker non versioned paths
    43  	r.HandleFunc("/containers/create", s.APIHandler(compat.CreateContainer)).Methods(http.MethodPost)
    44  	// swagger:operation GET /containers/json compat ContainerList
    45  	// ---
    46  	// tags:
    47  	//  - containers (compat)
    48  	// summary: List containers
    49  	// description: Returns a list of containers
    50  	// parameters:
    51  	//  - in: query
    52  	//    name: all
    53  	//    type: boolean
    54  	//    default: false
    55  	//    description: Return all containers. By default, only running containers are shown
    56  	//  - in: query
    57  	//    name: external
    58  	//    type: boolean
    59  	//    default: false
    60  	//    description: Return containers in storage not controlled by Podman
    61  	//  - in: query
    62  	//    name: limit
    63  	//    description: Return this number of most recently created containers, including non-running ones.
    64  	//    type: integer
    65  	//  - in: query
    66  	//    name: size
    67  	//    type: boolean
    68  	//    default: false
    69  	//    description: Return the size of container as fields SizeRw and SizeRootFs.
    70  	//  - in: query
    71  	//    name: filters
    72  	//    type: string
    73  	//    description: |
    74  	//       Returns a list of containers.
    75  	//        - ancestor=(<image-name>[:<tag>], <image id>, or <image@digest>)
    76  	//        - before=(<container id> or <container name>)
    77  	//        - expose=(<port>[/<proto>]|<startport-endport>/[<proto>])
    78  	//        - exited=<int> containers with exit code of <int>
    79  	//        - health=(starting|healthy|unhealthy|none)
    80  	//        - id=<ID> a container's ID
    81  	//        - is-task=(true|false)
    82  	//        - label=key or label="key=value" of a container label
    83  	//        - name=<name> a container's name
    84  	//        - network=(<network id> or <network name>)
    85  	//        - publish=(<port>[/<proto>]|<startport-endport>/[<proto>])
    86  	//        - since=(<container id> or <container name>)
    87  	//        - status=(created|restarting|running|removing|paused|exited|dead)
    88  	//        - volume=(<volume name> or <mount point destination>)
    89  	// produces:
    90  	// - application/json
    91  	// responses:
    92  	//   200:
    93  	//     $ref: "#/responses/containersList"
    94  	//   400:
    95  	//     $ref: "#/responses/badParamError"
    96  	//   500:
    97  	//     $ref: "#/responses/internalError"
    98  	r.HandleFunc(VersionedPath("/containers/json"), s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
    99  	// Added non version path to URI to support docker non versioned paths
   100  	r.HandleFunc("/containers/json", s.APIHandler(compat.ListContainers)).Methods(http.MethodGet)
   101  	// swagger:operation POST  /containers/prune compat ContainerPrune
   102  	// ---
   103  	// tags:
   104  	//   - containers (compat)
   105  	// summary: Delete stopped containers
   106  	// description: Remove containers not in use
   107  	// parameters:
   108  	//  - in: query
   109  	//    name: filters
   110  	//    type: string
   111  	//    description:  |
   112  	//      Filters to process on the prune list, encoded as JSON (a `map[string][]string`).  Available filters:
   113  	//       - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
   114  	//       - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels.
   115  	// produces:
   116  	// - application/json
   117  	// responses:
   118  	//   200:
   119  	//     $ref: "#/responses/containersPrune"
   120  	//   500:
   121  	//     $ref: "#/responses/internalError"
   122  	r.HandleFunc(VersionedPath("/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
   123  	// Added non version path to URI to support docker non versioned paths
   124  	r.HandleFunc("/containers/prune", s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
   125  	// swagger:operation DELETE /containers/{name} compat ContainerDelete
   126  	// ---
   127  	// tags:
   128  	//  - containers (compat)
   129  	// summary: Remove a container
   130  	// parameters:
   131  	//  - in: path
   132  	//    name: name
   133  	//    type: string
   134  	//    required: true
   135  	//    description: the name or ID of the container
   136  	//  - in: query
   137  	//    name: force
   138  	//    type: boolean
   139  	//    default: false
   140  	//    description: If the container is running, kill it before removing it.
   141  	//  - in: query
   142  	//    name: v
   143  	//    type: boolean
   144  	//    default: false
   145  	//    description: Remove the volumes associated with the container.
   146  	//  - in: query
   147  	//    name: link
   148  	//    type: boolean
   149  	//    description: not supported
   150  	// produces:
   151  	// - application/json
   152  	// responses:
   153  	//   204:
   154  	//     description: no error
   155  	//   400:
   156  	//     $ref: "#/responses/badParamError"
   157  	//   404:
   158  	//     $ref: "#/responses/containerNotFound"
   159  	//   409:
   160  	//     $ref: "#/responses/conflictError"
   161  	//   500:
   162  	//     $ref: "#/responses/internalError"
   163  	r.HandleFunc(VersionedPath("/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
   164  	// Added non version path to URI to support docker non versioned paths
   165  	r.HandleFunc("/containers/{name}", s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
   166  	// swagger:operation GET /containers/{name}/json compat ContainerInspect
   167  	// ---
   168  	// tags:
   169  	//  - containers (compat)
   170  	// summary: Inspect container
   171  	// description: Return low-level information about a container.
   172  	// parameters:
   173  	//  - in: path
   174  	//    name: name
   175  	//    type: string
   176  	//    required: true
   177  	//    description: the name or id of the container
   178  	//  - in: query
   179  	//    name: size
   180  	//    type: boolean
   181  	//    default: false
   182  	//    description: include the size of the container
   183  	// produces:
   184  	// - application/json
   185  	// responses:
   186  	//   200:
   187  	//     $ref: "#/responses/containerInspectResponse"
   188  	//   404:
   189  	//     $ref: "#/responses/containerNotFound"
   190  	//   500:
   191  	//     $ref: "#/responses/internalError"
   192  	r.HandleFunc(VersionedPath("/containers/{name}/json"), s.APIHandler(compat.GetContainer)).Methods(http.MethodGet)
   193  	// Added non version path to URI to support docker non versioned paths
   194  	r.HandleFunc("/containers/{name}/json", s.APIHandler(compat.GetContainer)).Methods(http.MethodGet)
   195  	// swagger:operation POST /containers/{name}/kill compat ContainerKill
   196  	// ---
   197  	// tags:
   198  	//   - containers (compat)
   199  	// summary: Kill container
   200  	// description: Signal to send to the container as an integer or string (e.g. SIGINT)
   201  	// parameters:
   202  	//  - in: path
   203  	//    name: name
   204  	//    type: string
   205  	//    required: true
   206  	//    description: the name or ID of the container
   207  	//  - in: query
   208  	//    name: all
   209  	//    type: boolean
   210  	//    default: false
   211  	//    description: Send kill signal to all containers
   212  	//  - in: query
   213  	//    name: signal
   214  	//    type: string
   215  	//    default: TERM
   216  	//    description: signal to be sent to container
   217  	//    default: SIGKILL
   218  	// produces:
   219  	// - application/json
   220  	// responses:
   221  	//   204:
   222  	//     description: no error
   223  	//   404:
   224  	//     $ref: "#/responses/containerNotFound"
   225  	//   409:
   226  	//     $ref: "#/responses/conflictError"
   227  	//   500:
   228  	//     $ref: "#/responses/internalError"
   229  	r.HandleFunc(VersionedPath("/containers/{name}/kill"), s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
   230  	// Added non version path to URI to support docker non versioned paths
   231  	r.HandleFunc("/containers/{name}/kill", s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
   232  	// swagger:operation GET /containers/{name}/logs compat ContainerLogs
   233  	// ---
   234  	// tags:
   235  	//   - containers (compat)
   236  	// summary: Get container logs
   237  	// description: Get stdout and stderr logs from a container.
   238  	// parameters:
   239  	//  - in: path
   240  	//    name: name
   241  	//    type: string
   242  	//    required: true
   243  	//    description: the name or ID of the container
   244  	//  - in: query
   245  	//    name: follow
   246  	//    type: boolean
   247  	//    description: Keep connection after returning logs.
   248  	//  - in: query
   249  	//    name: stdout
   250  	//    type: boolean
   251  	//    description: Return logs from stdout
   252  	//  - in: query
   253  	//    name: stderr
   254  	//    type: boolean
   255  	//    description: Return logs from stderr
   256  	//  - in: query
   257  	//    name: since
   258  	//    type:  string
   259  	//    description: Only return logs since this time, as a UNIX timestamp
   260  	//  - in: query
   261  	//    name: until
   262  	//    type:  string
   263  	//    description: Only return logs before this time, as a UNIX timestamp
   264  	//  - in: query
   265  	//    name: timestamps
   266  	//    type: boolean
   267  	//    default: false
   268  	//    description: Add timestamps to every log line
   269  	//  - in: query
   270  	//    name: tail
   271  	//    type: string
   272  	//    description: Only return this number of log lines from the end of the logs
   273  	//    default: all
   274  	// produces:
   275  	// - application/json
   276  	// responses:
   277  	//   200:
   278  	//     description:  logs returned as a stream in response body.
   279  	//   404:
   280  	//      $ref: "#/responses/containerNotFound"
   281  	//   500:
   282  	//      $ref: "#/responses/internalError"
   283  	r.HandleFunc(VersionedPath("/containers/{name}/logs"), s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
   284  	// Added non version path to URI to support docker non versioned paths
   285  	r.HandleFunc("/containers/{name}/logs", s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
   286  	// swagger:operation POST /containers/{name}/pause compat ContainerPause
   287  	// ---
   288  	// tags:
   289  	//   - containers (compat)
   290  	// summary: Pause container
   291  	// description: Use the cgroups freezer to suspend all processes in a container.
   292  	// parameters:
   293  	//  - in: path
   294  	//    name: name
   295  	//    type: string
   296  	//    required: true
   297  	//    description: the name or ID of the container
   298  	// produces:
   299  	// - application/json
   300  	// responses:
   301  	//   204:
   302  	//     description: no error
   303  	//   404:
   304  	//     $ref: "#/responses/containerNotFound"
   305  	//   500:
   306  	//     $ref: "#/responses/internalError"
   307  	r.HandleFunc(VersionedPath("/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
   308  	// Added non version path to URI to support docker non versioned paths
   309  	r.HandleFunc("/containers/{name}/pause", s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
   310  	// swagger:operation POST /containers/{name}/restart compat ContainerRestart
   311  	// ---
   312  	// tags:
   313  	//   - containers (compat)
   314  	// summary: Restart container
   315  	// parameters:
   316  	//  - in: path
   317  	//    name: name
   318  	//    type: string
   319  	//    required: true
   320  	//    description: the name or ID of the container
   321  	//  - in: query
   322  	//    name: t
   323  	//    type: integer
   324  	//    description: timeout before sending kill signal to container
   325  	// produces:
   326  	// - application/json
   327  	// responses:
   328  	//   204:
   329  	//     description: no error
   330  	//   404:
   331  	//     $ref: "#/responses/containerNotFound"
   332  	//   500:
   333  	//     $ref: "#/responses/internalError"
   334  	r.HandleFunc(VersionedPath("/containers/{name}/restart"), s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
   335  	// Added non version path to URI to support docker non versioned paths
   336  	r.HandleFunc("/containers/{name}/restart", s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
   337  	// swagger:operation POST /containers/{name}/start compat ContainerStart
   338  	// ---
   339  	// tags:
   340  	//   - containers (compat)
   341  	// summary: Start a container
   342  	// parameters:
   343  	//  - in: path
   344  	//    name: name
   345  	//    type: string
   346  	//    required: true
   347  	//    description: the name or ID of the container
   348  	//  - in: query
   349  	//    name: detachKeys
   350  	//    type: string
   351  	//    description: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _."
   352  	//    default: ctrl-p,ctrl-q
   353  	// produces:
   354  	// - application/json
   355  	// responses:
   356  	//   204:
   357  	//     description: no error
   358  	//   304:
   359  	//     $ref: "#/responses/containerAlreadyStartedError"
   360  	//   404:
   361  	//     $ref: "#/responses/containerNotFound"
   362  	//   500:
   363  	//     $ref: "#/responses/internalError"
   364  	r.HandleFunc(VersionedPath("/containers/{name}/start"), s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
   365  	// Added non version path to URI to support docker non versioned paths
   366  	r.HandleFunc("/containers/{name}/start", s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
   367  	// swagger:operation GET /containers/{name}/stats compat ContainerStats
   368  	// ---
   369  	// tags:
   370  	//   - containers (compat)
   371  	// summary: Get stats for a container
   372  	// description: This returns a live stream of a container’s resource usage statistics.
   373  	// parameters:
   374  	//  - in: path
   375  	//    name: name
   376  	//    type: string
   377  	//    required: true
   378  	//    description: the name or ID of the container
   379  	//  - in: query
   380  	//    name: stream
   381  	//    type: boolean
   382  	//    default: true
   383  	//    description: Stream the output
   384  	//  - in: query
   385  	//    name: one-shot
   386  	//    type: boolean
   387  	//    default: false
   388  	//    description: Provide a one-shot response in which preCPU stats are blank, resulting in a single cycle return.
   389  	// produces:
   390  	// - application/json
   391  	// responses:
   392  	//   200:
   393  	//     description: no error
   394  	//     schema:
   395  	//       type: object
   396  	//   404:
   397  	//     $ref: "#/responses/containerNotFound"
   398  	//   500:
   399  	//     $ref: "#/responses/internalError"
   400  	r.HandleFunc(VersionedPath("/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
   401  	// Added non version path to URI to support docker non versioned paths
   402  	r.HandleFunc("/containers/{name}/stats", s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
   403  	// swagger:operation POST /containers/{name}/stop compat ContainerStop
   404  	// ---
   405  	// tags:
   406  	//   - containers (compat)
   407  	// summary: Stop a container
   408  	// description: Stop a container
   409  	// parameters:
   410  	//  - in: path
   411  	//    name: name
   412  	//    type: string
   413  	//    required: true
   414  	//    description: the name or ID of the container
   415  	//  - in: query
   416  	//    name: t
   417  	//    type: integer
   418  	//    description: number of seconds to wait before killing container
   419  	// produces:
   420  	// - application/json
   421  	// responses:
   422  	//   204:
   423  	//     description: no error
   424  	//   304:
   425  	//     $ref: "#/responses/containerAlreadyStoppedError"
   426  	//   404:
   427  	//     $ref: "#/responses/containerNotFound"
   428  	//   500:
   429  	//     $ref: "#/responses/internalError"
   430  	r.HandleFunc(VersionedPath("/containers/{name}/stop"), s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
   431  	// Added non version path to URI to support docker non versioned paths
   432  	r.HandleFunc("/containers/{name}/stop", s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
   433  	// swagger:operation GET /containers/{name}/top compat ContainerTop
   434  	// ---
   435  	// tags:
   436  	//   - containers (compat)
   437  	// summary: List processes running inside a container
   438  	// parameters:
   439  	//  - in: path
   440  	//    name: name
   441  	//    type: string
   442  	//    required: true
   443  	//    description: the name or ID of the container
   444  	//  - in: query
   445  	//    name: ps_args
   446  	//    type: string
   447  	//    default: -ef
   448  	//    description: arguments to pass to ps such as aux. Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
   449  	// produces:
   450  	// - application/json
   451  	// responses:
   452  	//   200:
   453  	//     $ref: "#/responses/containerTopResponse"
   454  	//   404:
   455  	//     $ref: "#/responses/containerNotFound"
   456  	//   500:
   457  	//     $ref: "#/responses/internalError"
   458  	r.HandleFunc(VersionedPath("/containers/{name}/top"), s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
   459  	// Added non version path to URI to support docker non versioned paths
   460  	r.HandleFunc("/containers/{name}/top", s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
   461  	// swagger:operation POST /containers/{name}/unpause compat ContainerUnpause
   462  	// ---
   463  	// tags:
   464  	//   - containers (compat)
   465  	// summary: Unpause container
   466  	// description: Resume a paused container
   467  	// parameters:
   468  	//  - in: path
   469  	//    name: name
   470  	//    type: string
   471  	//    required: true
   472  	//    description: the name or ID of the container
   473  	// produces:
   474  	// - application/json
   475  	// responses:
   476  	//   204:
   477  	//     description: no error
   478  	//   404:
   479  	//     $ref: "#/responses/containerNotFound"
   480  	//   500:
   481  	//     $ref: "#/responses/internalError"
   482  	r.HandleFunc(VersionedPath("/containers/{name}/unpause"), s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
   483  	// Added non version path to URI to support docker non versioned paths
   484  	r.HandleFunc("/containers/{name}/unpause", s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
   485  	// swagger:operation POST /containers/{name}/wait compat ContainerWait
   486  	// ---
   487  	// tags:
   488  	//   - containers (compat)
   489  	// summary: Wait on a container
   490  	// description: Block until a container stops or given condition is met.
   491  	// parameters:
   492  	//  - in: path
   493  	//    name: name
   494  	//    type: string
   495  	//    required: true
   496  	//    description: the name or ID of the container
   497  	//  - in: query
   498  	//    name: condition
   499  	//    type: string
   500  	//    description: |
   501  	//      wait until container is to a given condition. default is stopped. valid conditions are:
   502  	//        - configured
   503  	//        - created
   504  	//        - exited
   505  	//        - paused
   506  	//        - running
   507  	//        - stopped
   508  	//  - in: query
   509  	//    name: interval
   510  	//    type: string
   511  	//    default: "250ms"
   512  	//    description: Time Interval to wait before polling for completion.
   513  	// produces:
   514  	// - application/json
   515  	// responses:
   516  	//   200:
   517  	//     $ref: "#/responses/containerWaitResponse"
   518  	//   404:
   519  	//     $ref: "#/responses/containerNotFound"
   520  	//   500:
   521  	//     $ref: "#/responses/internalError"
   522  	r.HandleFunc(VersionedPath("/containers/{name}/wait"), s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost)
   523  	// Added non version path to URI to support docker non versioned paths
   524  	r.HandleFunc("/containers/{name}/wait", s.APIHandler(compat.WaitContainer)).Methods(http.MethodPost)
   525  	// swagger:operation POST /containers/{name}/attach compat ContainerAttach
   526  	// ---
   527  	// tags:
   528  	//   - containers (compat)
   529  	// summary: Attach to a container
   530  	// description: Hijacks the connection to forward the container's standard streams to the client.
   531  	// parameters:
   532  	//  - in: path
   533  	//    name: name
   534  	//    type: string
   535  	//    required: true
   536  	//    description: the name or ID of the container
   537  	//  - in: query
   538  	//    name: detachKeys
   539  	//    required: false
   540  	//    type: string
   541  	//    description: keys to use for detaching from the container
   542  	//  - in: query
   543  	//    name: logs
   544  	//    required: false
   545  	//    type: boolean
   546  	//    description: Stream all logs from the container across the connection. Happens before streaming attach (if requested). At least one of logs or stream must be set
   547  	//  - in: query
   548  	//    name: stream
   549  	//    required: false
   550  	//    type: boolean
   551  	//    default: true
   552  	//    description: Attach to the container. If unset, and logs is set, only the container's logs will be sent. At least one of stream or logs must be set
   553  	//  - in: query
   554  	//    name: stdout
   555  	//    required: false
   556  	//    type: boolean
   557  	//    description: Attach to container STDOUT
   558  	//  - in: query
   559  	//    name: stderr
   560  	//    required: false
   561  	//    type: boolean
   562  	//    description: Attach to container STDERR
   563  	//  - in: query
   564  	//    name: stdin
   565  	//    required: false
   566  	//    type: boolean
   567  	//    description: Attach to container STDIN
   568  	// produces:
   569  	// - application/json
   570  	// responses:
   571  	//   101:
   572  	//     description: No error, connection has been hijacked for transporting streams.
   573  	//   400:
   574  	//     $ref: "#/responses/badParamError"
   575  	//   404:
   576  	//     $ref: "#/responses/containerNotFound"
   577  	//   500:
   578  	//     $ref: "#/responses/internalError"
   579  	r.HandleFunc(VersionedPath("/containers/{name}/attach"), s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
   580  	// Added non version path to URI to support docker non versioned paths
   581  	r.HandleFunc("/containers/{name}/attach", s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
   582  	// swagger:operation POST /containers/{name}/resize compat ContainerResize
   583  	// ---
   584  	// tags:
   585  	//  - containers (compat)
   586  	// summary: Resize a container's TTY
   587  	// description: Resize the terminal attached to a container (for use with Attach).
   588  	// parameters:
   589  	//  - in: path
   590  	//    name: name
   591  	//    type: string
   592  	//    required: true
   593  	//    description: the name or ID of the container
   594  	//  - in: query
   595  	//    name: h
   596  	//    type: integer
   597  	//    required: false
   598  	//    description: Height to set for the terminal, in characters
   599  	//  - in: query
   600  	//    name: w
   601  	//    type: integer
   602  	//    required: false
   603  	//    description: Width to set for the terminal, in characters
   604  	//  - in: query
   605  	//    name: running
   606  	//    type: boolean
   607  	//    required: false
   608  	//    description: Ignore containers not running errors
   609  	// produces:
   610  	// - application/json
   611  	// responses:
   612  	//   200:
   613  	//     $ref: "#/responses/ok"
   614  	//   404:
   615  	//     $ref: "#/responses/containerNotFound"
   616  	//   500:
   617  	//     $ref: "#/responses/internalError"
   618  	r.HandleFunc(VersionedPath("/containers/{name}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
   619  	// Added non version path to URI to support docker non versioned paths
   620  	r.HandleFunc("/containers/{name}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
   621  	// swagger:operation GET /containers/{name}/export compat ContainerExport
   622  	// ---
   623  	// tags:
   624  	//   - containers (compat)
   625  	// summary: Export a container
   626  	// description: Export the contents of a container as a tarball.
   627  	// parameters:
   628  	//  - in: path
   629  	//    name: name
   630  	//    type: string
   631  	//    required: true
   632  	//    description: the name or ID of the container
   633  	// produces:
   634  	// - application/json
   635  	// responses:
   636  	//   200:
   637  	//     description: tarball is returned in body
   638  	//   404:
   639  	//     $ref: "#/responses/containerNotFound"
   640  	//   500:
   641  	//     $ref: "#/responses/internalError"
   642  	r.HandleFunc(VersionedPath("/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
   643  	r.HandleFunc("/containers/{name}/export", s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
   644  	// swagger:operation POST /containers/{name}/rename compat ContainerRename
   645  	// ---
   646  	// tags:
   647  	//   - containers (compat)
   648  	// summary: Rename an existing container
   649  	// description: Change the name of an existing container.
   650  	// parameters:
   651  	//  - in: path
   652  	//    name: name
   653  	//    type: string
   654  	//    required: true
   655  	//    description: Full or partial ID or full name of the container to rename
   656  	//  - in: query
   657  	//    name: name
   658  	//    type: string
   659  	//    required: true
   660  	//    description: New name for the container
   661  	// produces:
   662  	// - application/json
   663  	// responses:
   664  	//   204:
   665  	//     description: no error
   666  	//   404:
   667  	//     $ref: "#/responses/containerNotFound"
   668  	//   409:
   669  	//     $ref: "#/responses/conflictError"
   670  	//   500:
   671  	//     $ref: "#/responses/internalError"
   672  	r.HandleFunc(VersionedPath("/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
   673  	r.HandleFunc("/containers/{name}/rename", s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
   674  
   675  	/*
   676  		libpod endpoints
   677  	*/
   678  
   679  	// swagger:operation POST /libpod/containers/create libpod ContainerCreateLibpod
   680  	// ---
   681  	//   summary: Create a container
   682  	//   tags:
   683  	//    - containers
   684  	//   produces:
   685  	//   - application/json
   686  	//   parameters:
   687  	//    - in: body
   688  	//      name: create
   689  	//      description: attributes for creating a container
   690  	//      schema:
   691  	//        $ref: "#/definitions/SpecGenerator"
   692  	//   responses:
   693  	//     201:
   694  	//       $ref: "#/responses/containerCreateResponse"
   695  	//     400:
   696  	//       $ref: "#/responses/badParamError"
   697  	//     404:
   698  	//       $ref: "#/responses/containerNotFound"
   699  	//     409:
   700  	//       $ref: "#/responses/conflictError"
   701  	//     500:
   702  	//       $ref: "#/responses/internalError"
   703  	r.HandleFunc(VersionedPath("/libpod/containers/create"), s.APIHandler(libpod.CreateContainer)).Methods(http.MethodPost)
   704  	// swagger:operation GET /libpod/containers/json libpod ContainerListLibpod
   705  	// ---
   706  	// tags:
   707  	//  - containers
   708  	// summary: List containers
   709  	// description: Returns a list of containers
   710  	// parameters:
   711  	//  - in: query
   712  	//    name: all
   713  	//    type: boolean
   714  	//    default: false
   715  	//    description: Return all containers. By default, only running containers are shown
   716  	//  - in: query
   717  	//    name: limit
   718  	//    description: Return this number of most recently created containers, including non-running ones.
   719  	//    type: integer
   720  	//  - in: query
   721  	//    name: namespace
   722  	//    type: boolean
   723  	//    description: Include namespace information
   724  	//    default: false
   725  	//    name: pod
   726  	//    type: boolean
   727  	//    default: false
   728  	//    description: Ignored. Previously included details on pod name and ID that are currently included by default.
   729  	//  - in: query
   730  	//    name: size
   731  	//    type: boolean
   732  	//    default: false
   733  	//    description: Return the size of container as fields SizeRw and SizeRootFs.
   734  	//  - in: query
   735  	//    name: sync
   736  	//    type: boolean
   737  	//    default: false
   738  	//    description: Sync container state with OCI runtime
   739  	//  - in: query
   740  	//    name: filters
   741  	//    type: string
   742  	//    description: |
   743  	//        A JSON encoded value of the filters (a `map[string][]string`) to process on the containers list. Available filters:
   744  	//        - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
   745  	//        - `before`=(`<container id>` or `<container name>`)
   746  	//        - `expose`=(`<port>[/<proto>]` or `<startport-endport>/[<proto>]`)
   747  	//        - `exited=<int>` containers with exit code of `<int>`
   748  	//        - `health`=(`starting`, `healthy`, `unhealthy` or `none`)
   749  	//        - `id=<ID>` a container's ID
   750  	//        - `is-task`=(`true` or `false`)
   751  	//        - `label`=(`key` or `"key=value"`) of an container label
   752  	//        - `name=<name>` a container's name
   753  	//        - `network`=(`<network id>` or `<network name>`)
   754  	//        - `pod`=(`<pod id>` or `<pod name>`)
   755  	//        - `publish`=(`<port>[/<proto>]` or `<startport-endport>/[<proto>]`)
   756  	//        - `since`=(`<container id>` or `<container name>`)
   757  	//        - `status`=(`created`, `restarting`, `running`, `removing`, `paused`, `exited` or `dead`)
   758  	//        - `volume`=(`<volume name>` or `<mount point destination>`)
   759  	// produces:
   760  	// - application/json
   761  	// responses:
   762  	//   200:
   763  	//     $ref: "#/responses/containersListLibpod"
   764  	//   400:
   765  	//     $ref: "#/responses/badParamError"
   766  	//   500:
   767  	//     $ref: "#/responses/internalError"
   768  	r.HandleFunc(VersionedPath("/libpod/containers/json"), s.APIHandler(libpod.ListContainers)).Methods(http.MethodGet)
   769  	// swagger:operation POST  /libpod/containers/prune libpod ContainerPruneLibpod
   770  	// ---
   771  	// tags:
   772  	//   - containers
   773  	// summary: Delete stopped containers
   774  	// description: Remove containers not in use
   775  	// parameters:
   776  	//  - in: query
   777  	//    name: filters
   778  	//    type: string
   779  	//    description:  |
   780  	//      Filters to process on the prune list, encoded as JSON (a `map[string][]string`).  Available filters:
   781  	//       - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
   782  	//       - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels.
   783  	// produces:
   784  	// - application/json
   785  	// responses:
   786  	//   200:
   787  	//     $ref: "#/responses/containersPruneLibpod"
   788  	//   500:
   789  	//     $ref: "#/responses/internalError"
   790  	r.HandleFunc(VersionedPath("/libpod/containers/prune"), s.APIHandler(compat.PruneContainers)).Methods(http.MethodPost)
   791  	// swagger:operation GET /libpod/containers/showmounted libpod ContainerShowMountedLibpod
   792  	// ---
   793  	// tags:
   794  	//  - containers
   795  	// summary: Show mounted containers
   796  	// description: Lists all mounted containers mount points
   797  	// produces:
   798  	// - application/json
   799  	// responses:
   800  	//   200:
   801  	//     description: mounted containers
   802  	//     schema:
   803  	//      type: object
   804  	//      additionalProperties:
   805  	//       type: string
   806  	//   500:
   807  	//      $ref: "#/responses/internalError"
   808  	r.HandleFunc(VersionedPath("/libpod/containers/showmounted"), s.APIHandler(libpod.ShowMountedContainers)).Methods(http.MethodGet)
   809  	// swagger:operation DELETE /libpod/containers/{name} libpod ContainerDeleteLibpod
   810  	// ---
   811  	// tags:
   812  	//  - containers
   813  	// summary: Delete container
   814  	// description: Delete container
   815  	// parameters:
   816  	//  - in: path
   817  	//    name: name
   818  	//    type: string
   819  	//    required: true
   820  	//    description: the name or ID of the container
   821  	//  - in: query
   822  	//    name: depend
   823  	//    type: boolean
   824  	//    description: additionally remove containers that depend on the container to be removed
   825  	//  - in: query
   826  	//    name: force
   827  	//    type: boolean
   828  	//    description: force stop container if running
   829  	//  - in: query
   830  	//    name: ignore
   831  	//    type: boolean
   832  	//    description: ignore errors when the container to be removed does not existxo
   833  	//  - in: query
   834  	//    name: timeout
   835  	//    type: integer
   836  	//    default: 10
   837  	//    description: number of seconds to wait before killing container when force removing
   838  	//  - in: query
   839  	//    name: v
   840  	//    type: boolean
   841  	//    description: delete volumes
   842  	// produces:
   843  	// - application/json
   844  	// responses:
   845  	//   200:
   846  	//     $ref: "#/responses/containerRemoveLibpod"
   847  	//   204:
   848  	//     description: no error
   849  	//   400:
   850  	//     $ref: "#/responses/badParamError"
   851  	//   404:
   852  	//     $ref: "#/responses/containerNotFound"
   853  	//   409:
   854  	//     $ref: "#/responses/conflictError"
   855  	//   500:
   856  	//     $ref: "#/responses/internalError"
   857  	r.HandleFunc(VersionedPath("/libpod/containers/{name}"), s.APIHandler(compat.RemoveContainer)).Methods(http.MethodDelete)
   858  	// swagger:operation GET /libpod/containers/{name}/json libpod ContainerInspectLibpod
   859  	// ---
   860  	// tags:
   861  	//  - containers
   862  	// summary: Inspect container
   863  	// description: Return low-level information about a container.
   864  	// parameters:
   865  	//  - in: path
   866  	//    name: name
   867  	//    type: string
   868  	//    required: true
   869  	//    description: the name or ID of the container
   870  	//  - in: query
   871  	//    name: size
   872  	//    type: boolean
   873  	//    description: display filesystem usage
   874  	// produces:
   875  	// - application/json
   876  	// responses:
   877  	//   200:
   878  	//     $ref: "#/responses/containerInspectResponseLibpod"
   879  	//   404:
   880  	//     $ref: "#/responses/containerNotFound"
   881  	//   500:
   882  	//     $ref: "#/responses/internalError"
   883  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/json"), s.APIHandler(libpod.GetContainer)).Methods(http.MethodGet)
   884  	// swagger:operation POST /libpod/containers/{name}/kill libpod ContainerKillLibpod
   885  	// ---
   886  	// tags:
   887  	//  - containers
   888  	// summary: Kill container
   889  	// description: send a signal to a container, defaults to killing the container
   890  	// parameters:
   891  	//  - in: path
   892  	//    name: name
   893  	//    type: string
   894  	//    required: true
   895  	//    description: the name or ID of the container
   896  	//  - in: query
   897  	//    name: signal
   898  	//    type: string
   899  	//    default: TERM
   900  	//    description: signal to be sent to container, either by integer or SIG_ name
   901  	// produces:
   902  	// - application/json
   903  	// responses:
   904  	//   204:
   905  	//     description: no error
   906  	//   404:
   907  	//     $ref: "#/responses/containerNotFound"
   908  	//   409:
   909  	//     $ref: "#/responses/conflictError"
   910  	//   500:
   911  	//     $ref: "#/responses/internalError"
   912  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/kill"), s.APIHandler(compat.KillContainer)).Methods(http.MethodPost)
   913  	// swagger:operation POST /libpod/containers/{name}/mount libpod ContainerMountLibpod
   914  	// ---
   915  	// tags:
   916  	//  - containers
   917  	// summary: Mount a container
   918  	// description: Mount a container to the filesystem
   919  	// parameters:
   920  	//  - in: path
   921  	//    name: name
   922  	//    type: string
   923  	//    required: true
   924  	//    description: the name or ID of the container
   925  	// produces:
   926  	// - application/json
   927  	// responses:
   928  	//   200:
   929  	//     description: mounted container
   930  	//     schema:
   931  	//      description: id
   932  	//      type: string
   933  	//      example: /var/lib/containers/storage/overlay/f3f693bd88872a1e3193f4ebb925f4c282e8e73aadb8ab3e7492754dda3a02a4/merged
   934  	//   404:
   935  	//     $ref: "#/responses/containerNotFound"
   936  	//   500:
   937  	//     $ref: "#/responses/internalError"
   938  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/mount"), s.APIHandler(libpod.MountContainer)).Methods(http.MethodPost)
   939  	// swagger:operation POST /libpod/containers/{name}/unmount libpod ContainerUnmountLibpod
   940  	// ---
   941  	// tags:
   942  	//  - containers
   943  	// summary: Unmount a container
   944  	// description: Unmount a container from the filesystem
   945  	// produces:
   946  	// - application/json
   947  	// parameters:
   948  	//  - in: path
   949  	//    name: name
   950  	//    type: string
   951  	//    required: true
   952  	//    description: the name or ID of the container
   953  	// responses:
   954  	//   204:
   955  	//     description: ok
   956  	//   404:
   957  	//     $ref: "#/responses/containerNotFound"
   958  	//   500:
   959  	//     $ref: "#/responses/internalError"
   960  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/unmount"), s.APIHandler(libpod.UnmountContainer)).Methods(http.MethodPost)
   961  	// swagger:operation GET /libpod/containers/{name}/logs libpod ContainerLogsLibpod
   962  	// ---
   963  	// tags:
   964  	//   - containers
   965  	// summary: Get container logs
   966  	// description: Get stdout and stderr logs from a container.
   967  	// parameters:
   968  	//  - in: path
   969  	//    name: name
   970  	//    type: string
   971  	//    required: true
   972  	//    description: the name or ID of the container
   973  	//  - in: query
   974  	//    name: follow
   975  	//    type: boolean
   976  	//    description: Keep connection after returning logs.
   977  	//  - in: query
   978  	//    name: stdout
   979  	//    type: boolean
   980  	//    description: Return logs from stdout
   981  	//  - in: query
   982  	//    name: stderr
   983  	//    type: boolean
   984  	//    description: Return logs from stderr
   985  	//  - in: query
   986  	//    name: since
   987  	//    type:  string
   988  	//    description: Only return logs since this time, as a UNIX timestamp
   989  	//  - in: query
   990  	//    name: until
   991  	//    type:  string
   992  	//    description: Only return logs before this time, as a UNIX timestamp
   993  	//  - in: query
   994  	//    name: timestamps
   995  	//    type: boolean
   996  	//    default: false
   997  	//    description: Add timestamps to every log line
   998  	//  - in: query
   999  	//    name: tail
  1000  	//    type: string
  1001  	//    description: Only return this number of log lines from the end of the logs
  1002  	//    default: all
  1003  	// produces:
  1004  	// - application/json
  1005  	// responses:
  1006  	//   200:
  1007  	//     description:  logs returned as a stream in response body.
  1008  	//   404:
  1009  	//      $ref: "#/responses/containerNotFound"
  1010  	//   500:
  1011  	//      $ref: "#/responses/internalError"
  1012  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/logs"), s.APIHandler(compat.LogsFromContainer)).Methods(http.MethodGet)
  1013  	// swagger:operation POST /libpod/containers/{name}/pause libpod ContainerPauseLibpod
  1014  	// ---
  1015  	// tags:
  1016  	//  - containers
  1017  	// summary: Pause a container
  1018  	// description: Use the cgroups freezer to suspend all processes in a container.
  1019  	// parameters:
  1020  	//  - in: path
  1021  	//    name: name
  1022  	//    type: string
  1023  	//    required: true
  1024  	//    description: the name or ID of the container
  1025  	// produces:
  1026  	// - application/json
  1027  	// responses:
  1028  	//   204:
  1029  	//     description: no error
  1030  	//   404:
  1031  	//     $ref: "#/responses/containerNotFound"
  1032  	//   500:
  1033  	//     $ref: "#/responses/internalError"
  1034  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
  1035  	// swagger:operation POST /libpod/containers/{name}/restart libpod ContainerRestartLibpod
  1036  	// ---
  1037  	// tags:
  1038  	//  - containers
  1039  	// summary: Restart a container
  1040  	// parameters:
  1041  	//  - in: path
  1042  	//    name: name
  1043  	//    type: string
  1044  	//    required: true
  1045  	//    description: the name or ID of the container
  1046  	//  - in: query
  1047  	//    name: t
  1048  	//    type: integer
  1049  	//    default: 10
  1050  	//    description: number of seconds to wait before killing container
  1051  	// produces:
  1052  	// - application/json
  1053  	// responses:
  1054  	//   204:
  1055  	//     description: no error
  1056  	//   404:
  1057  	//     $ref: "#/responses/containerNotFound"
  1058  	//   500:
  1059  	//     $ref: "#/responses/internalError"
  1060  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/restart"), s.APIHandler(compat.RestartContainer)).Methods(http.MethodPost)
  1061  	// swagger:operation POST /libpod/containers/{name}/start libpod ContainerStartLibpod
  1062  	// ---
  1063  	// tags:
  1064  	//  - containers
  1065  	// summary: Start a container
  1066  	// parameters:
  1067  	//  - in: path
  1068  	//    name: name
  1069  	//    type: string
  1070  	//    required: true
  1071  	//    description: the name or ID of the container
  1072  	//  - in: query
  1073  	//    name: detachKeys
  1074  	//    type: string
  1075  	//    description: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _."
  1076  	//    default: ctrl-p,ctrl-q
  1077  	// produces:
  1078  	// - application/json
  1079  	// responses:
  1080  	//   204:
  1081  	//     description: no error
  1082  	//   304:
  1083  	//     $ref: "#/responses/containerAlreadyStartedError"
  1084  	//   404:
  1085  	//     $ref: "#/responses/containerNotFound"
  1086  	//   500:
  1087  	//     $ref: "#/responses/internalError"
  1088  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/start"), s.APIHandler(compat.StartContainer)).Methods(http.MethodPost)
  1089  	// swagger:operation GET /libpod/containers/{name}/stats libpod ContainerStatsLibpod
  1090  	// ---
  1091  	// tags:
  1092  	//  - containers
  1093  	// summary: Get stats for a container
  1094  	// description: DEPRECATED. This endpoint will be removed with the next major release. Please use /libpod/containers/stats instead.
  1095  	// parameters:
  1096  	//  - in: path
  1097  	//    name: name
  1098  	//    type: string
  1099  	//    required: true
  1100  	//    description: the name or ID of the container
  1101  	//  - in: query
  1102  	//    name: stream
  1103  	//    type: boolean
  1104  	//    default: true
  1105  	//    description: Stream the output
  1106  	// produces:
  1107  	// - application/json
  1108  	// responses:
  1109  	//   200:
  1110  	//     description: no error
  1111  	//   404:
  1112  	//     $ref: "#/responses/containerNotFound"
  1113  	//   409:
  1114  	//     $ref: "#/responses/conflictError"
  1115  	//   500:
  1116  	//     $ref: "#/responses/internalError"
  1117  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/stats"), s.APIHandler(compat.StatsContainer)).Methods(http.MethodGet)
  1118  	// swagger:operation GET /libpod/containers/stats libpod ContainersStatsAllLibpod
  1119  	// ---
  1120  	// tags:
  1121  	//  - containers
  1122  	// summary: Get stats for one or more containers
  1123  	// description: Return a live stream of resource usage statistics of one or more container. If no container is specified, the statistics of all containers are returned.
  1124  	// parameters:
  1125  	//  - in: query
  1126  	//    name: containers
  1127  	//    description: names or IDs of containers
  1128  	//    type: array
  1129  	//    items:
  1130  	//       type: string
  1131  	//  - in: query
  1132  	//    name: stream
  1133  	//    type: boolean
  1134  	//    default: true
  1135  	//    description: Stream the output
  1136  	//  - in: query
  1137  	//    name: interval
  1138  	//    type: integer
  1139  	//    default: 5
  1140  	//    description: Time in seconds between stats reports
  1141  	// produces:
  1142  	// - application/json
  1143  	// responses:
  1144  	//   200:
  1145  	//     $ref: "#/responses/containerStats"
  1146  	//   404:
  1147  	//     $ref: "#/responses/containerNotFound"
  1148  	//   500:
  1149  	//     $ref: "#/responses/internalError"
  1150  	r.HandleFunc(VersionedPath("/libpod/containers/stats"), s.APIHandler(libpod.StatsContainer)).Methods(http.MethodGet)
  1151  
  1152  	// swagger:operation GET /libpod/containers/{name}/top libpod ContainerTopLibpod
  1153  	// ---
  1154  	// tags:
  1155  	//  - containers
  1156  	// summary: List processes
  1157  	// description: List processes running inside a container
  1158  	// parameters:
  1159  	//  - in: path
  1160  	//    name: name
  1161  	//    type: string
  1162  	//    required: true
  1163  	//    description: Name of container to query for processes (As of version 1.xx)
  1164  	//  - in: query
  1165  	//    name: stream
  1166  	//    type: boolean
  1167  	//    description: when true, repeatedly stream the latest output (As of version 4.0)
  1168  	//  - in: query
  1169  	//    name: delay
  1170  	//    type: integer
  1171  	//    description: if streaming, delay in seconds between updates. Must be >1. (As of version 4.0)
  1172  	//    default: 5
  1173  	//  - in: query
  1174  	//    name: ps_args
  1175  	//    type: string
  1176  	//    default: -ef
  1177  	//    description: |
  1178  	//      arguments to pass to ps such as aux.
  1179  	//      Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
  1180  	// produces:
  1181  	// - application/json
  1182  	// responses:
  1183  	//   200:
  1184  	//     $ref: "#/responses/containerTopResponse"
  1185  	//   404:
  1186  	//     $ref: "#/responses/containerNotFound"
  1187  	//   500:
  1188  	//     $ref: "#/responses/internalError"
  1189  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/top"), s.APIHandler(compat.TopContainer)).Methods(http.MethodGet)
  1190  	// swagger:operation POST /libpod/containers/{name}/unpause libpod ContainerUnpauseLibpod
  1191  	// ---
  1192  	// tags:
  1193  	//  - containers
  1194  	// summary: Unpause Container
  1195  	// parameters:
  1196  	//  - in: path
  1197  	//    name: name
  1198  	//    type: string
  1199  	//    required: true
  1200  	//    description: the name or ID of the container
  1201  	// produces:
  1202  	// - application/json
  1203  	// responses:
  1204  	//   204:
  1205  	//     description: no error
  1206  	//   404:
  1207  	//     $ref: "#/responses/containerNotFound"
  1208  	//   500:
  1209  	//     $ref: "#/responses/internalError"
  1210  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/unpause"), s.APIHandler(compat.UnpauseContainer)).Methods(http.MethodPost)
  1211  	// swagger:operation POST /libpod/containers/{name}/wait libpod ContainerWaitLibpod
  1212  	// ---
  1213  	// tags:
  1214  	//  - containers
  1215  	// summary: Wait on a container
  1216  	// description: Wait on a container to meet a given condition
  1217  	// parameters:
  1218  	//  - in: path
  1219  	//    name: name
  1220  	//    type: string
  1221  	//    required: true
  1222  	//    description: the name or ID of the container
  1223  	//  - in: query
  1224  	//    name: condition
  1225  	//    type: array
  1226  	//    items:
  1227  	//      type: string
  1228  	//      enum:
  1229  	//       - configured
  1230  	//       - created
  1231  	//       - running
  1232  	//       - stopped
  1233  	//       - paused
  1234  	//       - exited
  1235  	//       - removing
  1236  	//       - stopping
  1237  	//    description: "Conditions to wait for. If no condition provided the 'exited' condition is assumed."
  1238  	//  - in: query
  1239  	//    name: interval
  1240  	//    type: string
  1241  	//    default: "250ms"
  1242  	//    description: Time Interval to wait before polling for completion.
  1243  	// produces:
  1244  	// - application/json
  1245  	// - text/plain
  1246  	// responses:
  1247  	//   200:
  1248  	//     description: Status code
  1249  	//     schema:
  1250  	//       type: integer
  1251  	//       format: int32
  1252  	//     examples:
  1253  	//       text/plain: 137
  1254  	//   404:
  1255  	//     $ref: "#/responses/containerNotFound"
  1256  	//   500:
  1257  	//     $ref: "#/responses/internalError"
  1258  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/wait"), s.APIHandler(libpod.WaitContainer)).Methods(http.MethodPost)
  1259  	// swagger:operation GET /libpod/containers/{name}/exists libpod ContainerExistsLibpod
  1260  	// ---
  1261  	// tags:
  1262  	//  - containers
  1263  	// summary: Check if container exists
  1264  	// description: Quick way to determine if a container exists by name or ID
  1265  	// parameters:
  1266  	//  - in: path
  1267  	//    name: name
  1268  	//    type: string
  1269  	//    required: true
  1270  	//    description: the name or ID of the container
  1271  	// produces:
  1272  	// - application/json
  1273  	// responses:
  1274  	//   204:
  1275  	//     description: container exists
  1276  	//   404:
  1277  	//     $ref: "#/responses/containerNotFound"
  1278  	//   500:
  1279  	//     $ref: "#/responses/internalError"
  1280  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/exists"), s.APIHandler(libpod.ContainerExists)).Methods(http.MethodGet)
  1281  	// swagger:operation POST /libpod/containers/{name}/stop libpod ContainerStopLibpod
  1282  	// ---
  1283  	// tags:
  1284  	//  - containers
  1285  	// summary: Stop a container
  1286  	// parameters:
  1287  	//  - in: path
  1288  	//    name: name
  1289  	//    type: string
  1290  	//    required: true
  1291  	//    description: the name or ID of the container
  1292  	//  - in: query
  1293  	//    name: all
  1294  	//    type: boolean
  1295  	//    default: false
  1296  	//    description: Stop all containers
  1297  	//  - in: query
  1298  	//    name: timeout
  1299  	//    type: integer
  1300  	//    default: 10
  1301  	//    description: number of seconds to wait before killing container
  1302  	//  - in: query
  1303  	//    name: Ignore
  1304  	//    type: boolean
  1305  	//    default: false
  1306  	//    description: do not return error if container is already stopped
  1307  	// produces:
  1308  	// - application/json
  1309  	// responses:
  1310  	//   204:
  1311  	//     description: no error
  1312  	//   304:
  1313  	//     $ref: "#/responses/containerAlreadyStoppedError"
  1314  	//   404:
  1315  	//     $ref: "#/responses/containerNotFound"
  1316  	//   500:
  1317  	//     $ref: "#/responses/internalError"
  1318  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/stop"), s.APIHandler(compat.StopContainer)).Methods(http.MethodPost)
  1319  	// swagger:operation POST /libpod/containers/{name}/attach libpod ContainerAttachLibpod
  1320  	// ---
  1321  	// tags:
  1322  	//   - containers
  1323  	// summary: Attach to a container
  1324  	// description: Hijacks the connection to forward the container's standard streams to the client.
  1325  	// parameters:
  1326  	//  - in: path
  1327  	//    name: name
  1328  	//    type: string
  1329  	//    required: true
  1330  	//    description: the name or ID of the container
  1331  	//  - in: query
  1332  	//    name: detachKeys
  1333  	//    required: false
  1334  	//    type: string
  1335  	//    description: keys to use for detaching from the container
  1336  	//  - in: query
  1337  	//    name: logs
  1338  	//    required: false
  1339  	//    type: boolean
  1340  	//    description: Stream all logs from the container across the connection. Happens before streaming attach (if requested). At least one of logs or stream must be set
  1341  	//  - in: query
  1342  	//    name: stream
  1343  	//    required: false
  1344  	//    type: boolean
  1345  	//    default: true
  1346  	//    description: Attach to the container. If unset, and logs is set, only the container's logs will be sent. At least one of stream or logs must be set
  1347  	//  - in: query
  1348  	//    name: stdout
  1349  	//    required: false
  1350  	//    type: boolean
  1351  	//    description: Attach to container STDOUT
  1352  	//  - in: query
  1353  	//    name: stderr
  1354  	//    required: false
  1355  	//    type: boolean
  1356  	//    description: Attach to container STDERR
  1357  	//  - in: query
  1358  	//    name: stdin
  1359  	//    required: false
  1360  	//    type: boolean
  1361  	//    description: Attach to container STDIN
  1362  	// produces:
  1363  	// - application/json
  1364  	// responses:
  1365  	//   101:
  1366  	//     description: No error, connection has been hijacked for transporting streams.
  1367  	//   400:
  1368  	//     $ref: "#/responses/badParamError"
  1369  	//   404:
  1370  	//     $ref: "#/responses/containerNotFound"
  1371  	//   500:
  1372  	//     $ref: "#/responses/internalError"
  1373  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/attach"), s.APIHandler(compat.AttachContainer)).Methods(http.MethodPost)
  1374  	// swagger:operation POST /libpod/containers/{name}/resize libpod ContainerResizeLibpod
  1375  	// ---
  1376  	// tags:
  1377  	//  - containers
  1378  	// summary: Resize a container's TTY
  1379  	// description: Resize the terminal attached to a container (for use with Attach).
  1380  	// parameters:
  1381  	//  - in: path
  1382  	//    name: name
  1383  	//    type: string
  1384  	//    required: true
  1385  	//    description: the name or ID of the container
  1386  	//  - in: query
  1387  	//    name: h
  1388  	//    type: integer
  1389  	//    required: false
  1390  	//    description: Height to set for the terminal, in characters
  1391  	//  - in: query
  1392  	//    name: w
  1393  	//    type: integer
  1394  	//    required: false
  1395  	//    description: Width to set for the terminal, in characters
  1396  	// produces:
  1397  	// - application/json
  1398  	// responses:
  1399  	//   200:
  1400  	//     $ref: "#/responses/ok"
  1401  	//   404:
  1402  	//     $ref: "#/responses/containerNotFound"
  1403  	//   409:
  1404  	//     $ref: "#/responses/conflictError"
  1405  	//   500:
  1406  	//     $ref: "#/responses/internalError"
  1407  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
  1408  	// swagger:operation GET /libpod/containers/{name}/export libpod ContainerExportLibpod
  1409  	// ---
  1410  	// tags:
  1411  	//   - containers
  1412  	// summary: Export a container
  1413  	// description: Export the contents of a container as a tarball.
  1414  	// parameters:
  1415  	//  - in: path
  1416  	//    name: name
  1417  	//    type: string
  1418  	//    required: true
  1419  	//    description: the name or ID of the container
  1420  	// produces:
  1421  	// - application/json
  1422  	// responses:
  1423  	//   200:
  1424  	//     description: tarball is returned in body
  1425  	//   404:
  1426  	//     $ref: "#/responses/containerNotFound"
  1427  	//   500:
  1428  	//     $ref: "#/responses/internalError"
  1429  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
  1430  	// swagger:operation POST /libpod/containers/{name}/checkpoint libpod ContainerCheckpointLibpod
  1431  	// ---
  1432  	// tags:
  1433  	//   - containers
  1434  	// summary: Checkpoint a container
  1435  	// parameters:
  1436  	//  - in: path
  1437  	//    name: name
  1438  	//    type: string
  1439  	//    required: true
  1440  	//    description: the name or ID of the container
  1441  	//  - in: query
  1442  	//    name: keep
  1443  	//    type: boolean
  1444  	//    description: keep all temporary checkpoint files
  1445  	//  - in: query
  1446  	//    name: leaveRunning
  1447  	//    type: boolean
  1448  	//    description: leave the container running after writing checkpoint to disk
  1449  	//  - in: query
  1450  	//    name: tcpEstablished
  1451  	//    type: boolean
  1452  	//    description: checkpoint a container with established TCP connections
  1453  	//  - in: query
  1454  	//    name: export
  1455  	//    type: boolean
  1456  	//    description:  export the checkpoint image to a tar.gz
  1457  	//  - in: query
  1458  	//    name: ignoreRootFS
  1459  	//    type: boolean
  1460  	//    description: do not include root file-system changes when exporting
  1461  	//  - in: query
  1462  	//    name: printStats
  1463  	//    type: boolean
  1464  	//    description: add checkpoint statistics to the returned CheckpointReport
  1465  	// produces:
  1466  	// - application/json
  1467  	// responses:
  1468  	//   200:
  1469  	//     description: tarball is returned in body if exported
  1470  	//   404:
  1471  	//     $ref: "#/responses/containerNotFound"
  1472  	//   500:
  1473  	//     $ref: "#/responses/internalError"
  1474  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/checkpoint"), s.APIHandler(libpod.Checkpoint)).Methods(http.MethodPost)
  1475  	// swagger:operation POST /libpod/containers/{name}/restore libpod ContainerRestoreLibpod
  1476  	// ---
  1477  	// tags:
  1478  	//   - containers
  1479  	// summary: Restore a container
  1480  	// description: Restore a container from a checkpoint.
  1481  	// parameters:
  1482  	//  - in: path
  1483  	//    name: name
  1484  	//    type: string
  1485  	//    required: true
  1486  	//    description: the name or id of the container
  1487  	//  - in: query
  1488  	//    name: name
  1489  	//    type: string
  1490  	//    description: the name of the container when restored from a tar. can only be used with import
  1491  	//  - in: query
  1492  	//    name: keep
  1493  	//    type: boolean
  1494  	//    description: keep all temporary checkpoint files
  1495  	//  - in: query
  1496  	//    name: leaveRunning
  1497  	//    type: boolean
  1498  	//    description: leave the container running after writing checkpoint to disk
  1499  	//  - in: query
  1500  	//    name: tcpEstablished
  1501  	//    type: boolean
  1502  	//    description: checkpoint a container with established TCP connections
  1503  	//  - in: query
  1504  	//    name: import
  1505  	//    type: boolean
  1506  	//    description:  import the restore from a checkpoint tar.gz
  1507  	//  - in: query
  1508  	//    name: ignoreRootFS
  1509  	//    type: boolean
  1510  	//    description: do not include root file-system changes when exporting
  1511  	//  - in: query
  1512  	//    name: ignoreStaticIP
  1513  	//    type: boolean
  1514  	//    description: ignore IP address if set statically
  1515  	//  - in: query
  1516  	//    name: ignoreStaticMAC
  1517  	//    type: boolean
  1518  	//    description: ignore MAC address if set statically
  1519  	//  - in: query
  1520  	//    name: printStats
  1521  	//    type: boolean
  1522  	//    description: add restore statistics to the returned RestoreReport
  1523  	// produces:
  1524  	// - application/json
  1525  	// responses:
  1526  	//   200:
  1527  	//     description: tarball is returned in body if exported
  1528  	//   404:
  1529  	//     $ref: "#/responses/containerNotFound"
  1530  	//   500:
  1531  	//     $ref: "#/responses/internalError"
  1532  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/restore"), s.APIHandler(libpod.Restore)).Methods(http.MethodPost)
  1533  	// swagger:operation GET /containers/{name}/changes compat ContainerChanges
  1534  	// swagger:operation GET /libpod/containers/{name}/changes libpod ContainerChangesLibpod
  1535  	// ---
  1536  	// tags:
  1537  	//   - containers
  1538  	//   - containers (compat)
  1539  	// summary: Report on changes to container's filesystem; adds, deletes or modifications.
  1540  	// description: |
  1541  	//   Returns which files in a container's filesystem have been added, deleted, or modified. The Kind of modification can be one of:
  1542  	//
  1543  	//   0: Modified
  1544  	//   1: Added
  1545  	//   2: Deleted
  1546  	// parameters:
  1547  	//  - in: path
  1548  	//    name: name
  1549  	//    type: string
  1550  	//    required: true
  1551  	//    description: the name or id of the container
  1552  	//  - in: query
  1553  	//    name: parent
  1554  	//    type: string
  1555  	//    description: specify a second layer which is used to compare against it instead of the parent layer
  1556  	//  - in: query
  1557  	//    name: diffType
  1558  	//    type: string
  1559  	//    enum: [all, container, image]
  1560  	//    description: select what you want to match, default is all
  1561  	// responses:
  1562  	//   200:
  1563  	//     description: Array of Changes
  1564  	//     content:
  1565  	//       application/json:
  1566  	//       schema:
  1567  	//         $ref: "#/responses/Changes"
  1568  	//   404:
  1569  	//     $ref: "#/responses/containerNotFound"
  1570  	//   500:
  1571  	//     $ref: "#/responses/internalError"
  1572  	r.HandleFunc(VersionedPath("/containers/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet)
  1573  	r.HandleFunc("/containers/{name}/changes", s.APIHandler(compat.Changes)).Methods(http.MethodGet)
  1574  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/changes"), s.APIHandler(compat.Changes)).Methods(http.MethodGet)
  1575  	// swagger:operation POST /libpod/containers/{name}/init libpod ContainerInitLibpod
  1576  	// ---
  1577  	// tags:
  1578  	//  - containers
  1579  	// summary: Initialize a container
  1580  	// description: Performs all tasks necessary for initializing the container but does not start the container.
  1581  	// parameters:
  1582  	//  - in: path
  1583  	//    name: name
  1584  	//    type: string
  1585  	//    required: true
  1586  	//    description: the name or ID of the container
  1587  	// produces:
  1588  	// - application/json
  1589  	// responses:
  1590  	//   204:
  1591  	//     description: no error
  1592  	//   304:
  1593  	//     description: container already initialized
  1594  	//   404:
  1595  	//     $ref: "#/responses/containerNotFound"
  1596  	//   500:
  1597  	//     $ref: "#/responses/internalError"
  1598  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/init"), s.APIHandler(libpod.InitContainer)).Methods(http.MethodPost)
  1599  	// swagger:operation POST /libpod/containers/{name}/rename libpod ContainerRenameLibpod
  1600  	// ---
  1601  	// tags:
  1602  	//   - containers
  1603  	// summary: Rename an existing container
  1604  	// description: Change the name of an existing container.
  1605  	// parameters:
  1606  	//  - in: path
  1607  	//    name: name
  1608  	//    type: string
  1609  	//    required: true
  1610  	//    description: Full or partial ID or full name of the container to rename
  1611  	//  - in: query
  1612  	//    name: name
  1613  	//    type: string
  1614  	//    required: true
  1615  	//    description: New name for the container
  1616  	// produces:
  1617  	// - application/json
  1618  	// responses:
  1619  	//   204:
  1620  	//     description: no error
  1621  	//   404:
  1622  	//     $ref: "#/responses/containerNotFound"
  1623  	//   409:
  1624  	//     $ref: "#/responses/conflictError"
  1625  	//   500:
  1626  	//     $ref: "#/responses/internalError"
  1627  	r.HandleFunc(VersionedPath("/libpod/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
  1628  	return nil
  1629  }