Xapp registration/deregistration to RIC
[ric-plt/xapp-frame.git] / pkg / restapi / embedded_spec.go
index 8cb57e1..dd67843 100644 (file)
@@ -34,6 +34,30 @@ func init() {
   "host": "hostname",
   "basePath": "/ric/v1",
   "paths": {
+    "/config": {
+      "get": {
+        "produces": [
+          "application/json",
+          "application/xml"
+        ],
+        "tags": [
+          "xapp"
+        ],
+        "summary": "Returns the configuration of all xapps",
+        "operationId": "getXappConfigList",
+        "responses": {
+          "200": {
+            "description": "successful query of xApp config",
+            "schema": {
+              "$ref": "#/definitions/XappConfigList"
+            }
+          },
+          "500": {
+            "description": "Internal error"
+          }
+        }
+      }
+    },
     "/subscriptions": {
       "get": {
         "produces": [
@@ -187,6 +211,28 @@ func init() {
         }
       }
     },
+    "ConfigMetadata": {
+      "type": "object",
+      "required": [
+        "xappName",
+        "configType"
+      ],
+      "properties": {
+        "configType": {
+          "description": "The type of the content",
+          "type": "string",
+          "enum": [
+            "json",
+            "xml",
+            "other"
+          ]
+        },
+        "xappName": {
+          "description": "Name of the xApp",
+          "type": "string"
+        }
+      }
+    },
     "EventTrigger": {
       "type": "object",
       "properties": {
@@ -443,6 +489,28 @@ func init() {
         "policy",
         "report"
       ]
+    },
+    "XAppConfig": {
+      "type": "object",
+      "required": [
+        "metadata",
+        "config"
+      ],
+      "properties": {
+        "config": {
+          "description": "Configuration in JSON format",
+          "type": "object"
+        },
+        "metadata": {
+          "$ref": "#/definitions/ConfigMetadata"
+        }
+      }
+    },
+    "XappConfigList": {
+      "type": "array",
+      "items": {
+        "$ref": "#/definitions/XAppConfig"
+      }
     }
   }
 }`))
@@ -463,6 +531,30 @@ func init() {
   "host": "hostname",
   "basePath": "/ric/v1",
   "paths": {
+    "/config": {
+      "get": {
+        "produces": [
+          "application/json",
+          "application/xml"
+        ],
+        "tags": [
+          "xapp"
+        ],
+        "summary": "Returns the configuration of all xapps",
+        "operationId": "getXappConfigList",
+        "responses": {
+          "200": {
+            "description": "successful query of xApp config",
+            "schema": {
+              "$ref": "#/definitions/XappConfigList"
+            }
+          },
+          "500": {
+            "description": "Internal error"
+          }
+        }
+      }
+    },
     "/subscriptions": {
       "get": {
         "produces": [
@@ -616,6 +708,28 @@ func init() {
         }
       }
     },
+    "ConfigMetadata": {
+      "type": "object",
+      "required": [
+        "xappName",
+        "configType"
+      ],
+      "properties": {
+        "configType": {
+          "description": "The type of the content",
+          "type": "string",
+          "enum": [
+            "json",
+            "xml",
+            "other"
+          ]
+        },
+        "xappName": {
+          "description": "Name of the xApp",
+          "type": "string"
+        }
+      }
+    },
     "EventTrigger": {
       "type": "object",
       "properties": {
@@ -872,6 +986,28 @@ func init() {
         "policy",
         "report"
       ]
+    },
+    "XAppConfig": {
+      "type": "object",
+      "required": [
+        "metadata",
+        "config"
+      ],
+      "properties": {
+        "config": {
+          "description": "Configuration in JSON format",
+          "type": "object"
+        },
+        "metadata": {
+          "$ref": "#/definitions/ConfigMetadata"
+        }
+      }
+    },
+    "XappConfigList": {
+      "type": "array",
+      "items": {
+        "$ref": "#/definitions/XAppConfig"
+      }
     }
   }
 }`))