Skip to content

Commit

Permalink
Merge pull request #9944 from jwhonce/wip/operation_id
Browse files Browse the repository at this point in the history
[CI:DOCS] Set all swagger operation id's to be compatible
  • Loading branch information
openshift-merge-robot authored Apr 6, 2021
2 parents 2b13c5d + fa47b4f commit f143de9
Show file tree
Hide file tree
Showing 20 changed files with 188 additions and 177 deletions.
12 changes: 6 additions & 6 deletions pkg/api/server/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package api Provides a container compatible interface.
// Package api Provides an API for the Libpod library
//
// This documentation describes the Podman v2.0 RESTful API.
// It replaces the Podman v1.0 API and was initially delivered
Expand All @@ -21,22 +21,22 @@
//
// 'podman info'
//
// curl --unix-socket /run/podman/podman.sock http://d/v1.0.0/libpod/info
// curl --unix-socket /run/podman/podman.sock http://d/v3.0.0/libpod/info
//
// 'podman pull quay.io/containers/podman'
//
// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v1.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman'
// curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman'
//
// 'podman list images'
//
// curl --unix-socket /run/podman/podman.sock -v 'http://d/v1.0.0/libpod/images/json' | jq
// curl --unix-socket /run/podman/podman.sock -v 'http://d/v3.0.0/libpod/images/json' | jq
//
// Terms Of Service:
//
// Schemes: http, https
// Host: podman.io
// BasePath: /
// Version: 0.0.1
// Version: 3.2.0
// License: Apache-2.0 https://opensource.org/licenses/Apache-2.0
// Contact: Podman <[email protected]> https://podman.io/community/
//
Expand All @@ -47,8 +47,8 @@
//
// Produces:
// - application/json
// - application/octet-stream
// - text/plain
// - text/html
//
// Consumes:
// - application/json
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/server/register_archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// swagger:operation PUT /containers/{name}/archive compat putArchive
// swagger:operation PUT /containers/{name}/archive compat PutContainerArchive
// ---
// summary: Put files into a container
// description: Put a tar archive of files into a container
Expand Down Expand Up @@ -52,7 +52,7 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"

// swagger:operation GET /containers/{name}/archive compat getArchive
// swagger:operation GET /containers/{name}/archive compat ContainerArchive
// ---
// summary: Get files from a container
// description: Get a tar archive of files from a container
Expand Down Expand Up @@ -91,7 +91,7 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
Libpod
*/

// swagger:operation PUT /libpod/containers/{name}/archive libpod libpodPutArchive
// swagger:operation PUT /libpod/containers/{name}/archive libpod PutContainerArchiveLibpod
// ---
// summary: Copy files into a container
// description: Copy a tar archive of files into a container
Expand Down Expand Up @@ -132,7 +132,7 @@ func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"

// swagger:operation GET /libpod/containers/{name}/archive libpod libpodGetArchive
// swagger:operation GET /libpod/containers/{name}/archive libpod ContainerArchiveLibpod
// ---
// summary: Copy files from a container
// description: Copy a tar archive of files from a container
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/server/register_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerAuthHandlers(r *mux.Router) error {
// swagger:operation POST /auth compat auth
// swagger:operation POST /auth compat SystemAuth
// ---
// summary: Check auth configuration
// tags:
Expand Down
96 changes: 48 additions & 48 deletions pkg/api/server/register_containers.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/api/server/register_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
// swagger:operation GET /events system getEvents
// swagger:operation GET /events system SystemEvents
// ---
// tags:
// - system (compat)
Expand Down Expand Up @@ -37,7 +37,7 @@ func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/events"), s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/events", s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
// swagger:operation GET /libpod/events system libpodGetEvents
// swagger:operation GET /libpod/events system SystemEventsLibpod
// ---
// tags:
// - system
Expand Down
18 changes: 9 additions & 9 deletions pkg/api/server/register_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// swagger:operation POST /containers/{name}/exec compat createExec
// swagger:operation POST /containers/{name}/exec compat ContainerExec
// ---
// tags:
// - exec (compat)
Expand Down Expand Up @@ -77,7 +77,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/containers/{name}/exec"), s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/containers/{name}/exec", s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// swagger:operation POST /exec/{id}/start compat startExec
// swagger:operation POST /exec/{id}/start compat ExecStart
// ---
// tags:
// - exec (compat)
Expand All @@ -102,7 +102,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// type: boolean
// description: Allocate a pseudo-TTY. Presently ignored.
// produces:
// - application/json
// - application/octet-stream
// responses:
// 200:
// description: no error
Expand All @@ -115,7 +115,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/exec/{id}/start"), s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/start", s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// swagger:operation POST /exec/{id}/resize compat resizeExec
// swagger:operation POST /exec/{id}/resize compat ExecResize
// ---
// tags:
// - exec (compat)
Expand Down Expand Up @@ -153,7 +153,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/exec/{id}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.Handle("/exec/{id}/resize", s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /exec/{id}/json compat inspectExec
// swagger:operation GET /exec/{id}/json compat ExecInspect
// ---
// tags:
// - exec (compat)
Expand Down Expand Up @@ -182,7 +182,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
libpod api follows
*/

// swagger:operation POST /libpod/containers/{name}/exec libpod libpodCreateExec
// swagger:operation POST /libpod/containers/{name}/exec libpod ContainerExecLibpod
// ---
// tags:
// - exec
Expand Down Expand Up @@ -249,7 +249,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/containers/{name}/exec"), s.APIHandler(compat.ExecCreateHandler)).Methods(http.MethodPost)
// swagger:operation POST /libpod/exec/{id}/start libpod libpodStartExec
// swagger:operation POST /libpod/exec/{id}/start libpod ExecStartLibpod
// ---
// tags:
// - exec
Expand Down Expand Up @@ -285,7 +285,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/exec/{id}/start"), s.APIHandler(compat.ExecStartHandler)).Methods(http.MethodPost)
// swagger:operation POST /libpod/exec/{id}/resize libpod libpodResizeExec
// swagger:operation POST /libpod/exec/{id}/resize libpod ExecResizeLibpod
// ---
// tags:
// - exec
Expand Down Expand Up @@ -316,7 +316,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/exec/{id}/resize"), s.APIHandler(compat.ResizeTTY)).Methods(http.MethodPost)
// swagger:operation GET /libpod/exec/{id}/json libpod libpodInspectExec
// swagger:operation GET /libpod/exec/{id}/json libpod ExecInspectLibpod
// ---
// tags:
// - exec
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/server/register_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// swagger:operation GET /libpod/generate/{name:.*}/systemd libpod libpodGenerateSystemd
// swagger:operation GET /libpod/generate/{name:.*}/systemd libpod GenerateSystemdLibpod
// ---
// tags:
// - containers
Expand Down Expand Up @@ -75,7 +75,7 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/systemd"), s.APIHandler(libpod.GenerateSystemd)).Methods(http.MethodGet)

// swagger:operation GET /libpod/generate/kube libpod libpodGenerateKube
// swagger:operation GET /libpod/generate/kube libpod GenerateKubeLibpod
// ---
// tags:
// - containers
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/server/register_healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func (s *APIServer) registerHealthCheckHandlers(r *mux.Router) error {
// swagger:operation GET /libpod/containers/{name:.*}/healthcheck libpod libpodRunHealthCheck
// swagger:operation GET /libpod/containers/{name:.*}/healthcheck libpod ContainerHealthcheckLibpod
// ---
// tags:
// - containers
Expand Down
Loading

0 comments on commit f143de9

Please sign in to comment.