소스 검색

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"