X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestapi%2Fembedded_spec.go;h=dd678436195e56120974fe159bbfa3b938e32932;hb=refs%2Ftags%2Fv0.7.3;hp=79f78696dd710358f6709d1086cb4e7169bc5bab;hpb=429da19d53224135082f8b6f65470ae3ee8df176;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/embedded_spec.go b/pkg/restapi/embedded_spec.go index 79f7869..dd67843 100644 --- a/pkg/restapi/embedded_spec.go +++ b/pkg/restapi/embedded_spec.go @@ -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": [ @@ -137,6 +161,12 @@ func init() { }, "/subscriptions/{subscriptionId}": { "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "common" ], @@ -181,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": { @@ -390,6 +442,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 +465,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" + } } } }, @@ -429,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" + } } } }`)) @@ -449,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": [ @@ -552,6 +658,12 @@ func init() { }, "/subscriptions/{subscriptionId}": { "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "common" ], @@ -596,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": { @@ -805,6 +939,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 +962,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" + } } } }, @@ -844,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" + } } } }`))