aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcm/swagger/vfc.db.swagger.json91
-rw-r--r--lcm/swagger/vfc.others.swagger.json78
-rw-r--r--lcm/swagger/views.py8
3 files changed, 98 insertions, 79 deletions
diff --git a/lcm/swagger/vfc.db.swagger.json b/lcm/swagger/vfc.db.swagger.json
index 6c8efb02..fde55d32 100644
--- a/lcm/swagger/vfc.db.swagger.json
+++ b/lcm/swagger/vfc.db.swagger.json
@@ -1 +1,90 @@
- \ No newline at end of file
+{
+ "swagger": "2.0",
+ "info": {
+ "version": "1.0.0",
+ "title": "ONAP VFC Service Internal DB Rest API"
+ },
+ "basePath": "/api/nslcm/v1",
+ "paths": {
+ "/mandb/{modelName}": {
+ "get": {
+ "tags": [
+ "Database"
+ ],
+ "summary": "query ns table info",
+ "description": "query ns table info",
+ "operationId": "query_ns_table",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "required": true,
+ "type": "string",
+ "description": "model Name.",
+ "name": "modelName",
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "schema": {
+ "$ref": "#/definitions/TableInfo"
+ }
+ },
+ "404": {
+ "description": "URL not found"
+ },
+ "500": {
+ "description": "the url is invalid"
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Database"
+ ],
+ "summary": "ns table delete",
+ "description": "ns table delete",
+ "operationId": "ns_table_delete",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "required": true,
+ "type": "string",
+ "description": "model Name.",
+ "name": "modelName",
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "The tables were deleted successfully."
+ },
+ "404": {
+ "description": "URL not found"
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "TableInfo": {
+ "type": "object",
+ "properties": {
+ "count": {
+ "type": "string"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/lcm/swagger/vfc.others.swagger.json b/lcm/swagger/vfc.others.swagger.json
index fe0bc826..16d70c0b 100644
--- a/lcm/swagger/vfc.others.swagger.json
+++ b/lcm/swagger/vfc.others.swagger.json
@@ -48,76 +48,6 @@
}
}
},
- "/mandb/{modelName}": {
- "get": {
- "tags": [
- "db"
- ],
- "summary": "query ns table info",
- "description": "query ns table info",
- "operationId": "query_ns_table",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "required": true,
- "type": "string",
- "description": "model Name.",
- "name": "modelName",
- "in": "path"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/TableInfo"
- }
- },
- "404": {
- "description": "URL not found"
- },
- "500": {
- "description": "the url is invalid"
- }
- }
- },
- "delete": {
- "tags": [
- "db"
- ],
- "summary": "ns table delete",
- "description": "ns table delete",
- "operationId": "ns_table_delete",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "required": true,
- "type": "string",
- "description": "model Name.",
- "name": "modelName",
- "in": "path"
- }
- ],
- "responses": {
- "204": {
- "description": "The tables were deleted successfully."
- },
- "404": {
- "description": "URL not found"
- }
- }
- }
- },
"/jobs/{jobId}": {
"post": {
"tags": [
@@ -178,14 +108,6 @@
"type": "string"
}
}
- },
- "TableInfo": {
- "type": "object",
- "properties": {
- "count": {
- "type": "string"
- }
- }
}
}
} \ No newline at end of file
diff --git a/lcm/swagger/views.py b/lcm/swagger/views.py
index 5034905c..e78ecead 100644
--- a/lcm/swagger/views.py
+++ b/lcm/swagger/views.py
@@ -53,6 +53,14 @@ class SwaggerJsonView(APIView):
json_data["paths"].update(json_data_temp["paths"])
json_data["definitions"].update(json_data_temp["definitions"])
+ json_file = os.path.join(os.path.dirname(__file__), 'vfc.db.swagger.json')
+ f = open(json_file)
+ json_data_temp = json.JSONDecoder().decode(f.read())
+ f.close()
+
+ json_data["paths"].update(json_data_temp["paths"])
+ json_data["definitions"].update(json_data_temp["definitions"])
+
json_file = os.path.join(os.path.dirname(__file__), 'vfc.others.swagger.json')
f = open(json_file)
json_data_temp = json.JSONDecoder().decode(f.read())