Add swagger for ns pkg del and get 55/7955/1
authorfujinhua <fu.jinhua@zte.com.cn>
Fri, 18 Aug 2017 01:08:19 +0000 (09:08 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Fri, 18 Aug 2017 01:08:19 +0000 (09:08 +0800)
Change-Id: I15b808cdfb626b17793c7ad95aa8424ca1812a9f
Issue-Id: VFC-104
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/ns/swagger.json

index c8262db..2f74e5e 100644 (file)
                         "schema": {
                             "$ref": "#/definitions/NsPkgPostResponse"
                         }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            }
+        },
+        "/nspackage/{csarId}": {
+            "get": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "query one ns package info",
+                "description": "query one ns package info",
+                "operationId": "query_one_ns_package",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of ns package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "successful operation",
+                        "schema": {
+                            "$ref": "#/definitions/NsPackageInfo"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
+                    }
+                }
+            },
+            "delete": {
+                "tags": [
+                    "ns package Resource"
+                ],
+                "summary": "delete ns pkg",
+                "description": "delete ns pkg",
+                "operationId": "delete_ns_pkg",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "parameters": [
+                    {
+                        "name": "csarId",
+                        "in": "path",
+                        "description": "csar id of ns package",
+                        "required": true,
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "202": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/NsPkgPostResponse"
+                        }
+                    },
+                    "500": {
+                        "description": "internal error"
                     }
                 }
             }
             "type": "object",
             "properties": {
                 "csars": {
+                    "$ref": "#/definitions/NsPkgListInfo"
+                }
+            }
+        },
+        "NsPkgListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
+        "NsPackageInfo": {
+            "type": "object",
+            "properties": {
+                "csarId": {
                     "type": "string"
+                },
+                "packageInfo": {
+                    "$ref": "#/definitions/NsPkgDetailInfo"
+                },
+                "nsInstanceInfo": {
+                    "$ref": "#/definitions/NsInstListInfo"
                 }
             }
         },
+        "NsPkgDetailInfo": {
+            "type": "object",
+            "properties": {
+                "nsdId": {
+                    "type": "string"
+                },
+                "nsdProvider": {
+                    "type": "string"
+                },
+                "nsdVersion": {
+                    "type": "string"
+                }
+            }
+        },
+        "NsInstListInfo": {
+            "type": "array",
+            "items": {
+                "type": "object"
+            }
+        },
         "VlPostRequest": {
             "type": "object",
             "properties": {