-
\ No newline at end of file
+{\r
+ "swagger": "2.0",\r
+ "info": {\r
+ "version": "1.0.0",\r
+ "title": "ONAP VFC Service Internal DB Rest API"\r
+ },\r
+ "basePath": "/api/nslcm/v1",\r
+ "paths": {\r
+ "/mandb/{modelName}": {\r
+ "get": {\r
+ "tags": [\r
+ "Database"\r
+ ],\r
+ "summary": "query ns table info",\r
+ "description": "query ns table info",\r
+ "operationId": "query_ns_table",\r
+ "consumes": [\r
+ "application/json"\r
+ ],\r
+ "produces": [\r
+ "application/json"\r
+ ],\r
+ "parameters": [\r
+ {\r
+ "required": true,\r
+ "type": "string",\r
+ "description": "model Name.",\r
+ "name": "modelName",\r
+ "in": "path"\r
+ }\r
+ ],\r
+ "responses": {\r
+ "200": {\r
+ "description": "successful operation",\r
+ "schema": {\r
+ "$ref": "#/definitions/TableInfo"\r
+ }\r
+ },\r
+ "404": {\r
+ "description": "URL not found"\r
+ },\r
+ "500": {\r
+ "description": "the url is invalid"\r
+ }\r
+ }\r
+ },\r
+ "delete": {\r
+ "tags": [\r
+ "Database"\r
+ ],\r
+ "summary": "ns table delete",\r
+ "description": "ns table delete",\r
+ "operationId": "ns_table_delete",\r
+ "consumes": [\r
+ "application/json"\r
+ ],\r
+ "produces": [\r
+ "application/json"\r
+ ],\r
+ "parameters": [\r
+ {\r
+ "required": true,\r
+ "type": "string",\r
+ "description": "model Name.",\r
+ "name": "modelName",\r
+ "in": "path"\r
+ }\r
+ ],\r
+ "responses": {\r
+ "204": {\r
+ "description": "The tables were deleted successfully."\r
+ },\r
+ "404": {\r
+ "description": "URL not found"\r
+ }\r
+ }\r
+ }\r
+ }\r
+ },\r
+ "definitions": {\r
+ "TableInfo": {\r
+ "type": "object",\r
+ "properties": {\r
+ "count": {\r
+ "type": "string"\r
+ }\r
+ }\r
+ }\r
+ }\r
+}
\ No newline at end of file
}
}
},
- "/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": [
"type": "string"
}
}
- },
- "TableInfo": {
- "type": "object",
- "properties": {
- "count": {
- "type": "string"
- }
- }
}
}
}
\ No newline at end of file
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())