diff options
author | baude <bbaude@redhat.com> | 2020-01-09 14:18:09 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-01-10 09:41:54 -0600 |
commit | 25b34972f4c58ede6528e3ae25c54c29eb9034e1 (patch) | |
tree | 6d33eaa070aac89f55da6ef9decf44825d9054b5 /pkg/api/server/register_volumes.go | |
parent | d924494f561bb878a2b3a7ce438d87ecb934b5fb (diff) | |
download | podman-25b34972f4c58ede6528e3ae25c54c29eb9034e1.tar.gz podman-25b34972f4c58ede6528e3ae25c54c29eb9034e1.tar.bz2 podman-25b34972f4c58ede6528e3ae25c54c29eb9034e1.zip |
[CI:DOCS]update apiv2 documentation with swagger goods
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/server/register_volumes.go')
-rw-r--r-- | pkg/api/server/register_volumes.go | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index 3a9cf8c2d..8fe5a67e4 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -8,10 +8,78 @@ import ( ) func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { + // swagger:operation POST /libpod/volumes/create volumes createVolume + // + // Create a volume + // + // --- + // produces: + // - application/json + // responses: + // '200': + // description: tbd + // '500': + // "$ref": "#/responses/InternalError" r.Handle("/libpod/volumes/create", APIHandler(s.Context, libpod.CreateVolume)).Methods(http.MethodPost) r.Handle("/libpod/volumes/json", APIHandler(s.Context, libpod.ListVolumes)).Methods(http.MethodGet) + // swagger:operation POST /volumes/prune volumes pruneVolumes + // + // Prune volumes + // + // --- + // produces: + // - application/json + // responses: + // '204': + // description: no error + // '500': + // "$ref": "#/responses/InternalError" r.Handle("/libpod/volumes/prune", APIHandler(s.Context, libpod.PruneVolumes)).Methods(http.MethodPost) + // swagger:operation GET /volumes/{nameOrID}/json volumes inspectVolume + // + // Inspect volume + // + // --- + // parameters: + // - in: path + // name: nameOrID + // required: true + // description: the name or ID of the volume + // produces: + // - application/json + // responses: + // '200': + // "$ref": "#/responses/InspectVolumeResponse" + // '404': + // "$ref": "#/responses/NoSuchVolume" + // '500': + // "$ref": "#/responses/InternalError" r.Handle("/libpod/volumes/{name:..*}/json", APIHandler(s.Context, libpod.InspectVolume)).Methods(http.MethodGet) + // swagger:operation DELETE /volumes/{nameOrID} volumes removeVolume + // + // Inspect volume + // + // --- + // parameters: + // - in: path + // name: nameOrID + // required: true + // description: the name or ID of the volume + // - in: query + // name: force + // type: bool + // description: force removal + // produces: + // - application/json + // responses: + // '204': + // description: no error + // '400': + // "$ref": "#/responses/BadParamError" + // '404': + // "$ref": "#/responses/NoSuchVolume" + // '500': + // "$ref": "#/responses/InternalError" r.Handle("/libpod/volumes/{name:..*}", APIHandler(s.Context, libpod.RemoveVolume)).Methods(http.MethodDelete) return nil } |