浏览代码

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

api: swagger: Adjust ContainerWaitResponse error as optional
Sebastiaan van Stijn 3 年之前
父节点
当前提交
a06bae9094
共有 5 个文件被更改,包括 5 次插入6 次删除
  1. 1 1
      api/swagger.yaml
  2. 1 2
      api/types/container/wait_response.go
  3. 1 1
      docs/api/v1.39.yaml
  4. 1 1
      docs/api/v1.40.yaml
  5. 1 1
      docs/api/v1.41.yaml

+ 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"