summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-21 20:10:21 +0200
committerGitHub <noreply@github.com>2021-05-21 20:10:21 +0200
commit490915c68e6fce48508d42d138ac1c92c877abe7 (patch)
tree68d46348f72d53c3d4cec6cf604791c2744d701a /pkg
parent7f4afe45abc07eb16e8a823c6ba9070d7a7a8f79 (diff)
parent8bf852d5f0e5d3b22da2a7401d37d1ef3475065f (diff)
downloadpodman-490915c68e6fce48508d42d138ac1c92c877abe7.tar.gz
podman-490915c68e6fce48508d42d138ac1c92c877abe7.tar.bz2
podman-490915c68e6fce48508d42d138ac1c92c877abe7.zip
Merge pull request #10365 from jwhonce/issues/9578
Match swagger to "as built" output
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/swagger/swagger.go18
-rw-r--r--pkg/api/handlers/types.go9
-rw-r--r--pkg/api/server/register_images.go2
3 files changed, 10 insertions, 19 deletions
diff --git a/pkg/api/handlers/swagger/swagger.go b/pkg/api/handlers/swagger/swagger.go
index ef3d12df8..83ff5914e 100644
--- a/pkg/api/handlers/swagger/swagger.go
+++ b/pkg/api/handlers/swagger/swagger.go
@@ -8,6 +8,15 @@ import (
"github.com/docker/docker/api/types"
)
+// Tree response
+// swagger:response TreeResponse
+type swagTree struct {
+ // in:body
+ Body struct {
+ entities.ImageTreeReport
+ }
+}
+
// History response
// swagger:response DocsHistory
type swagHistory struct {
@@ -183,12 +192,3 @@ type swagInspectVolumeResponse struct {
define.InspectVolumeData
}
}
-
-// Image tree response
-// swagger:response LibpodImageTreeResponse
-type swagImageTreeResponse struct {
- // in:body
- Body struct {
- handlers.ImageTreeResponse
- }
-}
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index 2ffd9b0cb..f94c9a1f5 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -148,15 +148,6 @@ type HistoryResponse struct {
Comment string
}
-type ImageLayer struct{}
-
-type ImageTreeResponse struct {
- ID string `json:"id"`
- Tags []string `json:"tags"`
- Size string `json:"size"`
- Layers []ImageLayer `json:"layers"`
-}
-
type ExecCreateConfig struct {
docker.ExecConfig
}
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index b32c0df20..9634bd83b 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -747,7 +747,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - application/json
// responses:
// 200:
- // $ref: '#/responses/LibpodImageTreeResponse'
+ // $ref: "#/responses/TreeResponse"
// 404:
// $ref: '#/responses/NoSuchImage'
// 500: