From 2fa67fe4b060eed870eada35e73c64559170626a Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Tue, 19 Jan 2021 20:23:02 -0800 Subject: api: fix import image swagger definition The podman API implementation only accepts image uploads with the applicatoin/x-tar content type, however the generated swagger documentation currently states this should be a form encoded file with the content type application/x-www-form-urlencoded which does not work. Signed-off-by: Ryan Goodfellow --- pkg/api/server/register_images.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkg/api') diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index 8d0c0800b..358f7126b 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -837,13 +837,16 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error { // name: url // description: Load image from the specified URL // type: string - // - in: formData + // - in: body // name: upload - // type: file // required: true // description: tarball for imported image + // schema: + // type: "string" // produces: // - application/json + // consumes: + // - application/x-tar // responses: // 200: // $ref: "#/responses/DocsLibpodImagesImportResponse" -- cgit v1.2.3-54-g00ecf