Explorar o código

Merge pull request #43656 from fussybeaver/ND-optional-container-wait-error

api: swagger: Adjust ContainerWaitResponse error as optional
Sebastiaan van Stijn %!s(int64=3) %!d(string=hai) anos
pai
achega
a06bae9094

+ 1 - 1
api/swagger.yaml

@@ -4656,7 +4656,7 @@ definitions:
     type: "object"
     x-go-name: "WaitResponse"
     title: "ContainerWaitResponse"
-    required: [StatusCode, Error]
+    required: [StatusCode]
     properties:
       StatusCode:
         description: "Exit code of the container"

+ 1 - 2
api/types/container/wait_response.go

@@ -10,8 +10,7 @@ package container
 type WaitResponse struct {
 
 	// error
-	// Required: true
-	Error *WaitExitError `json:"Error"`
+	Error *WaitExitError `json:"Error,omitempty"`
 
 	// Exit code of the container
 	// Required: true

+ 1 - 1
docs/api/v1.39.yaml

@@ -4336,7 +4336,7 @@ definitions:
     type: "object"
     x-go-name: "ContainerWaitOKBody"
     title: "ContainerWaitResponse"
-    required: [StatusCode, Error]
+    required: [StatusCode]
     properties:
       StatusCode:
         description: "Exit code of the container"

+ 1 - 1
docs/api/v1.40.yaml

@@ -4461,7 +4461,7 @@ definitions:
     type: "object"
     x-go-name: "ContainerWaitOKBody"
     title: "ContainerWaitResponse"
-    required: [StatusCode, Error]
+    required: [StatusCode]
     properties:
       StatusCode:
         description: "Exit code of the container"

+ 1 - 1
docs/api/v1.41.yaml

@@ -4634,7 +4634,7 @@ definitions:
     type: "object"
     x-go-name: "ContainerWaitOKBody"
     title: "ContainerWaitResponse"
-    required: [StatusCode, Error]
+    required: [StatusCode]
     properties:
       StatusCode:
         description: "Exit code of the container"