summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-04-07 09:18:23 -0700
committerMatthew Heon <mheon@redhat.com>2021-04-16 11:56:59 -0400
commit1df7f8e969556bd650d9daad2e4dfe0895ec433f (patch)
tree394fb18b42b3dc2c18c92a50c42874314268d3c5
parent3338901c4fe0c185a3980b799d2f687d0731b327 (diff)
downloadpodman-1df7f8e969556bd650d9daad2e4dfe0895ec433f.tar.gz
podman-1df7f8e969556bd650d9daad2e4dfe0895ec433f.tar.bz2
podman-1df7f8e969556bd650d9daad2e4dfe0895ec433f.zip
[CI:DOCS] Update swagger definition of inspect manifest
* Changed reference in swagger to correct struture that was being returned. * Added summary to ManifestAddLibpod to clean up generated web site * Added serve target to Makefile, to aid in debugging generated web site Signed-off-by: Jhon Honce <jhonce@redhat.com>
-rw-r--r--pkg/api/Makefile3
-rw-r--r--pkg/api/handlers/libpod/swagger.go2
-rw-r--r--pkg/api/server/register_manifest.go1
3 files changed, 5 insertions, 1 deletions
diff --git a/pkg/api/Makefile b/pkg/api/Makefile
index 6b24bfd83..6da5fb57e 100644
--- a/pkg/api/Makefile
+++ b/pkg/api/Makefile
@@ -5,6 +5,9 @@ SWAGGER_OUT ?= swagger.yaml
validate: ${SWAGGER_OUT}
swagger validate ${SWAGGER_OUT}
+serve: ${SWAGGER_OUT}
+ swagger serve -F redoc -p=8080 swagger.yaml
+
.PHONY: ${SWAGGER_OUT}
${SWAGGER_OUT}:
# generate doesn't remove file on error
diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go
index 2631f19ac..9450a70d9 100644
--- a/pkg/api/handlers/libpod/swagger.go
+++ b/pkg/api/handlers/libpod/swagger.go
@@ -25,7 +25,7 @@ type swagInspectPodResponse struct {
// swagger:response InspectManifest
type swagInspectManifestResponse struct {
// in:body
- Body manifest.List
+ Body manifest.Schema2List
}
// Kill Pod
diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go
index c2da5156b..adb545b51 100644
--- a/pkg/api/server/register_manifest.go
+++ b/pkg/api/server/register_manifest.go
@@ -81,6 +81,7 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/libpod/manifests/{name:.*}/json"), s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet)
// swagger:operation POST /libpod/manifests/{name:.*}/add manifests AddManifest
// ---
+ // summary: Add image
// description: Add an image to a manifest list
// produces:
// - application/json