mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user