Procházet zdrojové kódy

add status code 404 for plugin api endpoint enable and disable

Signed-off-by: allencloud <allen.sun@daocloud.io>
allencloud před 8 roky
rodič
revize
75f7305888
2 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. 8 0
      api/swagger.yaml
  2. 2 0
      docs/api/v1.24.md

+ 8 - 0
api/swagger.yaml

@@ -6610,6 +6610,10 @@ paths:
       responses:
         200:
           description: "no error"
+        404:
+          description: "plugin is not installed"
+          schema:
+            $ref: "#/definitions/ErrorResponse"
         500:
           description: "server error"
           schema:
@@ -6633,6 +6637,10 @@ paths:
       responses:
         200:
           description: "no error"
+        404:
+          description: "plugin is not installed"
+          schema:
+            $ref: "#/definitions/ErrorResponse"
         500:
           description: "server error"
           schema:

+ 2 - 0
docs/api/v1.24.md

@@ -3800,6 +3800,7 @@ Content-Type: text/plain; charset=utf-8
 **Status codes**:
 
 -   **200** - no error
+-   **404** - plugin not installed
 -   **500** - plugin is already enabled
 
 #### Disable a plugin
@@ -3828,6 +3829,7 @@ Content-Type: text/plain; charset=utf-8
 **Status codes**:
 
 -   **200** - no error
+-   **404** - plugin not installed
 -   **500** - plugin is already disabled
 
 #### Remove a plugin