summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-19 14:49:22 -0400
committerGitHub <noreply@github.com>2021-08-19 14:49:22 -0400
commita3f4fbd176e55040aa43ad461616e4d47cedc600 (patch)
tree31933ee9c578a373091a65b327a9e683dd54ce51 /pkg/api/server
parentaed232b9ddaa884cd0a67b36ba156f5eb90db889 (diff)
parent0897946f60e7a7096497a8a24a17c2581a339743 (diff)
downloadpodman-a3f4fbd176e55040aa43ad461616e4d47cedc600.tar.gz
podman-a3f4fbd176e55040aa43ad461616e4d47cedc600.tar.bz2
podman-a3f4fbd176e55040aa43ad461616e4d47cedc600.zip
Merge pull request #11271 from jwhonce/issues/8577
Clean up swagger
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_containers.go6
-rw-r--r--pkg/api/server/register_images.go35
-rw-r--r--pkg/api/server/register_pods.go2
-rw-r--r--pkg/api/server/swagger.go7
4 files changed, 35 insertions, 15 deletions
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 0ec4f95d9..b36cb75f1 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -21,6 +21,12 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// name: name
// type: string
// description: container name
+ // - in: body
+ // name: body
+ // description: Container to create
+ // schema:
+ // $ref: "#/definitions/CreateContainerConfig"
+ // required: true
// responses:
// 201:
// $ref: "#/responses/ContainerCreateResponse"
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 1c61f7f84..2630acac2 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -25,6 +25,10 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// produces:
// - application/json
// parameters:
+ // - in: header
+ // name: X-Registry-Auth
+ // type: string
+ // description: A base64-encoded auth configuration.
// - in: query
// name: fromImage
// type: string
@@ -49,13 +53,8 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// name: platform
// type: string
// description: Platform in the format os[/arch[/variant]]
- // default: ""
- // - in: header
- // name: X-Registry-Auth
- // type: string
- // description: A base64-encoded auth configuration.
// - in: body
- // name: request
+ // name: inputImage
// schema:
// type: string
// format: binary
@@ -472,6 +471,14 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// summary: Create image
// description: Build an image from the given Dockerfile(s)
// parameters:
+ // - in: header
+ // name: Content-Type
+ // type: string
+ // default: application/x-tar
+ // enum: ["application/x-tar"]
+ // - in: header
+ // name: X-Registry-Config
+ // type: string
// - in: query
// name: dockerfile
// type: string
@@ -653,6 +660,14 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: |
// output configuration TBD
// (As of version 1.xx)
+ // - in: body
+ // name: inputStream
+ // description: |
+ // A tar archive compressed with one of the following algorithms:
+ // identity (no compression), gzip, bzip2, xz.
+ // schema:
+ // type: string
+ // format: binary
// produces:
// - application/json
// responses:
@@ -852,6 +867,11 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// summary: Import image
// description: Import a previously exported tarball as an image.
// parameters:
+ // - in: header
+ // name: Content-Type
+ // type: string
+ // default: application/x-tar
+ // enum: ["application/x-tar"]
// - in: query
// name: changes
// description: "Apply the following possible instructions to the created image: CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | STOPSIGNAL | USER | VOLUME | WORKDIR. JSON encoded string"
@@ -875,7 +895,8 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// required: true
// description: tarball for imported image
// schema:
- // type: "string"
+ // type: string
+ // format: binary
// produces:
// - application/json
// consumes:
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go
index 58234005e..de3669a0a 100644
--- a/pkg/api/server/register_pods.go
+++ b/pkg/api/server/register_pods.go
@@ -51,7 +51,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// responses:
// 201:
// schema:
- // $ref: "#/definitions/IdResponse"
+ // $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 409:
diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go
index d282edf23..0fd66652e 100644
--- a/pkg/api/server/swagger.go
+++ b/pkg/api/server/swagger.go
@@ -141,13 +141,6 @@ type swagImageSummary struct {
Body []entities.ImageSummary
}
-// Registries summary
-// swagger:response DocsRegistriesList
-type swagRegistriesList struct {
- // in:body
- Body entities.ListRegistriesReport
-}
-
// List Containers
// swagger:response DocsListContainer
type swagListContainers struct {