diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-10 10:52:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 10:52:48 -0400 |
commit | cf4a7b8d37c48bc9ccf8e5a2fdc9b005113fd847 (patch) | |
tree | 14a365d5eb0a29c0f6e5ad153280a549c56ff24d | |
parent | 580ac4c6abc336d984f3a09940a4ef3006f0e6a7 (diff) | |
parent | f87f27ddc865c8feee2d5a6c0e2129d6efa9cc22 (diff) | |
download | podman-cf4a7b8d37c48bc9ccf8e5a2fdc9b005113fd847.tar.gz podman-cf4a7b8d37c48bc9ccf8e5a2fdc9b005113fd847.tar.bz2 podman-cf4a7b8d37c48bc9ccf8e5a2fdc9b005113fd847.zip |
Merge pull request #11516 from jelly/swagger/containerstats
[CI:DOCS] Add response to /libpod/containers/stats documentation
-rw-r--r-- | pkg/api/handlers/swagger/swagger.go | 9 | ||||
-rw-r--r-- | pkg/api/server/register_containers.go | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pkg/api/handlers/swagger/swagger.go b/pkg/api/handlers/swagger/swagger.go index 2296eea3a..9844839b7 100644 --- a/pkg/api/handlers/swagger/swagger.go +++ b/pkg/api/handlers/swagger/swagger.go @@ -176,3 +176,12 @@ type swagInspectPodResponse struct { define.InspectPodData } } + +// Get stats for one or more containers +// swagger:response ContainerStats +type swagContainerStatsResponse struct { + // in:body + Body struct { + define.ContainerStats + } +} diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index 2a32966cc..8dcea1301 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -1124,11 +1124,9 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // - application/json // responses: // 200: - // description: no error + // $ref: "#/responses/ContainerStats" // 404: // $ref: "#/responses/NoSuchContainer" - // 409: - // $ref: "#/responses/ConflictError" // 500: // $ref: "#/responses/InternalError" r.HandleFunc(VersionedPath("/libpod/containers/stats"), s.APIHandler(libpod.StatsContainer)).Methods(http.MethodGet) |