mirror of
https://github.com/containers/podman.git
synced 2025-06-26 12:56:45 +08:00
Merge pull request #13604 from jwhonce/issues/12804
Update swagger to improve compatibility
This commit is contained in:
@ -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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user