Merge pull request #11516 from jelly/swagger/containerstats

[CI:DOCS] Add response to /libpod/containers/stats documentation
This commit is contained in:
OpenShift Merge Robot 2021-09-10 10:52:48 -04:00 committed by GitHub
commit cf4a7b8d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -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
}
}

View File

@ -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)