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 <rgoodfel@isi.edu>
This commit is contained in:
Ryan Goodfellow 2021-01-19 20:23:02 -08:00
parent 6fd83de31d
commit 2fa67fe4b0
1 changed files with 5 additions and 2 deletions

View File

@ -837,13 +837,16 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// name: url // name: url
// description: Load image from the specified URL // description: Load image from the specified URL
// type: string // type: string
// - in: formData // - in: body
// name: upload // name: upload
// type: file
// required: true // required: true
// description: tarball for imported image // description: tarball for imported image
// schema:
// type: "string"
// produces: // produces:
// - application/json // - application/json
// consumes:
// - application/x-tar
// responses: // responses:
// 200: // 200:
// $ref: "#/responses/DocsLibpodImagesImportResponse" // $ref: "#/responses/DocsLibpodImagesImportResponse"