mirror of
https://github.com/containers/podman.git
synced 2025-06-25 03:52:15 +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 {
|
||||
ID string `json:"Id"`
|
||||
Warning []string
|
||||
Warning string
|
||||
}{
|
||||
ID: newNetwork.ID,
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ func (s *APIServer) registerExecHandlers(r *mux.Router) error {
|
||||
// - application/json
|
||||
// responses:
|
||||
// 200:
|
||||
// description: no error
|
||||
// $ref: "#/responses/InspectExecSession"
|
||||
// 404:
|
||||
// $ref: "#/responses/NoSuchExecInstance"
|
||||
// 500:
|
||||
|
@ -105,8 +105,15 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
||||
// schema:
|
||||
// $ref: "#/definitions/NetworkCreateRequest"
|
||||
// responses:
|
||||
// 200:
|
||||
// $ref: "#/responses/CompatNetworkCreate"
|
||||
// 201:
|
||||
// description: network created
|
||||
// schema:
|
||||
// type: object
|
||||
// properties:
|
||||
// Id:
|
||||
// type: string
|
||||
// Warning:
|
||||
// type: string
|
||||
// 400:
|
||||
// $ref: "#/responses/BadParamError"
|
||||
// 500:
|
||||
|
@ -235,3 +235,12 @@ type swagSystemAuthResponse struct {
|
||||
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 {
|
||||
Id []string //nolint
|
||||
Id []string // nolint
|
||||
Err map[string]error
|
||||
}
|
||||
|
||||
@ -98,8 +98,10 @@ type EventsOptions struct {
|
||||
// ContainerCreateResponse is the response struct for creating a container
|
||||
type ContainerCreateResponse struct {
|
||||
// ID of the container created
|
||||
// required: true
|
||||
ID string `json:"Id"`
|
||||
// Warnings during container creation
|
||||
// required: true
|
||||
Warnings []string `json:"Warnings"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user