summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-24 23:20:25 +0100
committerGitHub <noreply@github.com>2020-03-24 23:20:25 +0100
commitb4520649af59780df494d75f50d0b5081eafff04 (patch)
tree5edd6e5fd01f12154c82146ce6170aaf7d716e19 /pkg/api/server
parent0c084d9719772a9b68d5eb67114cf5bf001958b2 (diff)
parentae614920bfe2510ca6d1dd6cea02bbe17ddb245c (diff)
downloadpodman-b4520649af59780df494d75f50d0b5081eafff04.tar.gz
podman-b4520649af59780df494d75f50d0b5081eafff04.tar.bz2
podman-b4520649af59780df494d75f50d0b5081eafff04.zip
Merge pull request #5593 from baude/v2volumes
podmanv2 volumes
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_volumes.go10
-rw-r--r--pkg/api/server/swagger.go7
2 files changed, 12 insertions, 5 deletions
diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go
index 2cf249cc3..93b972b6b 100644
--- a/pkg/api/server/register_volumes.go
+++ b/pkg/api/server/register_volumes.go
@@ -53,8 +53,8 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// produces:
// - application/json
// responses:
- // '204':
- // description: no error
+ // '200':
+ // "$ref": "#/responses/VolumePruneResponse"
// '500':
// "$ref": "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/volumes/prune"), s.APIHandler(libpod.PruneVolumes)).Methods(http.MethodPost)
@@ -71,11 +71,11 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error {
// - application/json
// responses:
// '200':
- // "$ref": "#/responses/InspectVolumeResponse"
+ // "$ref": "#/responses/VolumeCreateResponse"
// '404':
- // "$ref": "#/responses/NoSuchVolume"
+ // "$ref": "#/responses/NoSuchVolume"
// '500':
- // "$ref": "#/responses/InternalError"
+ // "$ref": "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/volumes/{name}/json"), s.APIHandler(libpod.InspectVolume)).Methods(http.MethodGet)
// swagger:operation DELETE /libpod/volumes/{name} volumes removeVolume
// ---
diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go
index 2e1a269f2..50ce42b3b 100644
--- a/pkg/api/server/swagger.go
+++ b/pkg/api/server/swagger.go
@@ -151,6 +151,13 @@ type ok struct {
}
}
+// Volume prune response
+// swagger:response VolumePruneResponse
+type swagVolumePruneResponse struct {
+ // in:body
+ Body []entities.VolumePruneReport
+}
+
// Volume create response
// swagger:response VolumeCreateResponse
type swagVolumeCreateResponse struct {