mirror of https://github.com/containers/podman.git
Update swagger to improve compatibility
[NO NEW TESTS NEEDED] Improve swagger and handler code compatibility. Fixes #12804 Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
parent
c840f64e41
commit
41a6dd36f6
|
@ -242,7 +242,7 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
body := struct {
|
body := struct {
|
||||||
ID string `json:"Id"`
|
ID string `json:"Id"`
|
||||||
Warning []string
|
Warning string
|
||||||
}{
|
}{
|
||||||
ID: newNetwork.ID,
|
ID: newNetwork.ID,
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
|
||||||
// - application/json
|
// - application/json
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 200:
|
||||||
// description: no error
|
// $ref: "#/responses/InspectExecSession"
|
||||||
// 404:
|
// 404:
|
||||||
// $ref: "#/responses/NoSuchExecInstance"
|
// $ref: "#/responses/NoSuchExecInstance"
|
||||||
// 500:
|
// 500:
|
||||||
|
|
|
@ -105,8 +105,15 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
||||||
// schema:
|
// schema:
|
||||||
// $ref: "#/definitions/NetworkCreateRequest"
|
// $ref: "#/definitions/NetworkCreateRequest"
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 201:
|
||||||
// $ref: "#/responses/CompatNetworkCreate"
|
// description: network created
|
||||||
|
// schema:
|
||||||
|
// type: object
|
||||||
|
// properties:
|
||||||
|
// Id:
|
||||||
|
// type: string
|
||||||
|
// Warning:
|
||||||
|
// type: string
|
||||||
// 400:
|
// 400:
|
||||||
// $ref: "#/responses/BadParamError"
|
// $ref: "#/responses/BadParamError"
|
||||||
// 500:
|
// 500:
|
||||||
|
|
|
@ -235,3 +235,12 @@ type swagSystemAuthResponse struct {
|
||||||
entities.AuthReport
|
entities.AuthReport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Inspect response
|
||||||
|
// swagger:response InspectExecSession
|
||||||
|
type swagInspectExecSession struct {
|
||||||
|
// in:body
|
||||||
|
Body struct {
|
||||||
|
define.InspectExecSession
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ type Volume struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Report struct {
|
type Report struct {
|
||||||
Id []string //nolint
|
Id []string // nolint
|
||||||
Err map[string]error
|
Err map[string]error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,8 +98,10 @@ type EventsOptions struct {
|
||||||
// ContainerCreateResponse is the response struct for creating a container
|
// ContainerCreateResponse is the response struct for creating a container
|
||||||
type ContainerCreateResponse struct {
|
type ContainerCreateResponse struct {
|
||||||
// ID of the container created
|
// ID of the container created
|
||||||
|
// required: true
|
||||||
ID string `json:"Id"`
|
ID string `json:"Id"`
|
||||||
// Warnings during container creation
|
// Warnings during container creation
|
||||||
|
// required: true
|
||||||
Warnings []string `json:"Warnings"`
|
Warnings []string `json:"Warnings"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue