mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-12 03:45:46 +00:00
Add /containers/stats response to API docs
Include the response schema for a succesful request in the /containers/stats API documentation Additionally remove http 409 from /libpod/containers/stats docs, the documentation was copied from the deprecated stats endpoint, when a container is unavailabe the endpoint returns an empty list and no 409. Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
This commit is contained in:
parent
63f6656f8f
commit
f87f27ddc8
2 changed files with 10 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue