API update
[ric-plt/xapp-frame.git] / pkg / restapi / embedded_spec.go
index 79f7869..8cb57e1 100644 (file)
@@ -137,6 +137,12 @@ func init() {
     },
     "/subscriptions/{subscriptionId}": {
       "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
         "tags": [
           "common"
         ],
@@ -390,6 +396,21 @@ func init() {
         }
       }
     },
+    "SubscriptionInstance": {
+      "type": "object",
+      "required": [
+        "RequestorId",
+        "InstanceId"
+      ],
+      "properties": {
+        "InstanceId": {
+          "type": "integer"
+        },
+        "RequestorId": {
+          "type": "integer"
+        }
+      }
+    },
     "SubscriptionList": {
       "description": "A list of subscriptions",
       "type": "array",
@@ -398,27 +419,20 @@ func init() {
       }
     },
     "SubscriptionResponse": {
-      "type": "array",
-      "items": {
-        "$ref": "#/definitions/SubscriptionResponseItem"
-      }
-    },
-    "SubscriptionResponseItem": {
       "type": "object",
       "required": [
         "SubscriptionId",
-        "RequestorId",
-        "InstanceId"
+        "SubscriptionInstances"
       ],
       "properties": {
-        "InstanceId": {
-          "type": "integer"
-        },
-        "RequestorId": {
-          "type": "integer"
-        },
         "SubscriptionId": {
           "type": "string"
+        },
+        "SubscriptionInstances": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/SubscriptionInstance"
+          }
         }
       }
     },
@@ -552,6 +566,12 @@ func init() {
     },
     "/subscriptions/{subscriptionId}": {
       "delete": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
         "tags": [
           "common"
         ],
@@ -805,6 +825,21 @@ func init() {
         }
       }
     },
+    "SubscriptionInstance": {
+      "type": "object",
+      "required": [
+        "RequestorId",
+        "InstanceId"
+      ],
+      "properties": {
+        "InstanceId": {
+          "type": "integer"
+        },
+        "RequestorId": {
+          "type": "integer"
+        }
+      }
+    },
     "SubscriptionList": {
       "description": "A list of subscriptions",
       "type": "array",
@@ -813,27 +848,20 @@ func init() {
       }
     },
     "SubscriptionResponse": {
-      "type": "array",
-      "items": {
-        "$ref": "#/definitions/SubscriptionResponseItem"
-      }
-    },
-    "SubscriptionResponseItem": {
       "type": "object",
       "required": [
         "SubscriptionId",
-        "RequestorId",
-        "InstanceId"
+        "SubscriptionInstances"
       ],
       "properties": {
-        "InstanceId": {
-          "type": "integer"
-        },
-        "RequestorId": {
-          "type": "integer"
-        },
         "SubscriptionId": {
           "type": "string"
+        },
+        "SubscriptionInstances": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/SubscriptionInstance"
+          }
         }
       }
     },