Add swagger for ns pkg distribue 09/7809/1
authorfujinhua <fu.jinhua@zte.com.cn>
Thu, 17 Aug 2017 09:19:03 +0000 (17:19 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Thu, 17 Aug 2017 09:19:03 +0000 (17:19 +0800)
Change-Id: I05cbf2b7cdd26c08cdb6063ab1779b2a132e0666
Issue-Id: VFC-103
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/ns/swagger.json

index 1175420..c8262db 100644 (file)
         }
     ],
     "paths": {
+        "/nspackage": {
+            "get": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "query ns package info",
+                "description": "query ns package info",
+                "operationId": "query_ns_package",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                ],
+                "responses": {
+                    "200": {
+                        "description": "successful operation",
+                        "schema": {
+                            "$ref": "#/definitions/NsPackageListInfo"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            },
+            "post": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "ns package distribute",
+                "description": "ns package distribute",
+                "operationId": "ns_pkg_distribute",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "in": "body",
+                        "name": "body",
+                        "description": "distribute request param",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostRequest"
+                        }
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostResponse"
+                        }
+                    }
+                }
+            }
+        },
         "/ns/vls": {
             "post": {
                 "tags": [
         }
     },
     "definitions": {
+        "NsPkgPostRequest": {
+            "type": "object",
+            "properties": {
+                "csarId": {
+                    "type": "string"
+                }
+            }
+        },
+        "NsPkgPostResponse": {
+            "type": "object",
+            "properties": {
+                "status": {
+                    "type": "string"
+                },
+                "statusDescription": {
+                    "type": "string"
+                },
+                "errorCode": {
+                    "type": "string"
+                }
+            }
+        },
+        "NsPackageListInfo": {
+            "type": "object",
+            "properties": {
+                "csars": {
+                    "type": "string"
+                }
+            }
+        },
         "VlPostRequest": {
             "type": "object",
             "properties": {