docs not generated fix 18/8818/1
authorhalil.cakal <halil.cakal@est.tech>
Tue, 2 Aug 2022 07:54:43 +0000 (08:54 +0100)
committerhalil.cakal <halil.cakal@est.tech>
Tue, 2 Aug 2022 07:55:02 +0000 (08:55 +0100)
Issue-ID: NONRTRIC-771
Change-Id: I1e8ca742fec7611f3e039d600f6ed557ed219fb3
Signed-off-by: halil.cakal <halil.cakal@est.tech>
api/EXT_SRV_api.yaml [new file with mode: 0644]
docs/callout-server.rst
near-rt-ric-simulator/test/STD_2.0.0/build_and_start_with_kafka.sh

diff --git a/api/EXT_SRV_api.yaml b/api/EXT_SRV_api.yaml
new file mode 100644 (file)
index 0000000..043e984
--- /dev/null
@@ -0,0 +1,205 @@
+openapi: 3.0.0
+info:
+  title: 'External Server for A1 simulator'
+  version: 0.0.1
+  description: |
+    External test server.
+    © 2022, O-RAN Alliance.
+    All rights reserved.
+externalDocs:
+  description: 'An external server building CRUD RestFUL APIs which is provisioned by A1 simulator. It will be a refrence point for the callouts'
+  url: 'https://docs.o-ran-sc.org/projects/o-ran-sc-sim-a1-interface/en/latest/external-server.html'
+servers:
+  - url: '{apiRoot}'
+    variables:
+      apiRoot:
+        default: 'http://www.example.com'
+paths:
+  '/a1policies':
+    get:
+      operationId: server.get_all_a1_policies
+      description: 'Get all a1 policies'
+      tags:
+      - All a1policies
+      responses:
+        200:
+          description: 'Array of all a1 policies'
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  "$ref": "#/components/schemas/A1PolicyObject"
+                minItems: 0
+        429:
+          "$ref": "#/components/responses/429-TooManyRequests"
+        503:
+          "$ref": "#/components/responses/503-ServiceUnavailable"
+  '/a1policy/{a1policyId}':
+    parameters:
+      - name: a1policyId
+        in: path
+        required: true
+        schema:
+          "$ref": "#/components/schemas/A1PolicyId"
+    get:
+      operationId: server.get_a1_policy
+      description: 'Query for an A1 policy'
+      tags:
+      - Single A1 Policy Object
+      responses:
+        200:
+          description: 'The requested A1 policy object'
+          content:
+            application/json:
+              schema:
+                "$ref": "#/components/schemas/A1PolicyObject"
+        404:
+          "$ref": "#/components/responses/404-NotFound"
+        409:
+          "$ref": "#/components/responses/409-Conflict"
+        429:
+          "$ref": "#/components/responses/429-TooManyRequests"
+        503:
+          "$ref": "#/components/responses/503-ServiceUnavailable"
+    put:
+      operationId: server.put_a1_policy
+      description: 'Create an A1 policy'
+      tags:
+      - Individual A1 policy Object
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              "$ref": "#/components/schemas/A1PolicyObject"
+      responses:
+        200:
+          description: 'The A1 policy was updated'
+          content:
+            application/json:
+              schema:
+                "$ref": "#/components/schemas/A1PolicyObject"
+        201:
+          description: 'The A1 policy was created'
+          content:
+            application/json:
+              schema:
+                "$ref": "#/components/schemas/A1PolicyObject"
+          headers:
+            Location:
+              description: 'Contains the URI of the created A1 policy'
+              required: true
+              schema:
+                type: string
+        400:
+          "$ref": "#/components/responses/400-BadRequest"
+        409:
+          "$ref": "#/components/responses/409-Conflict"
+        429:
+          "$ref": "#/components/responses/429-TooManyRequests"
+        503:
+          "$ref": "#/components/responses/503-ServiceUnavailable"
+        507:
+          "$ref": "#/components/responses/507-InsufficientStorage"
+
+    delete:
+      operationId: server.delete_a1_policy
+      description: 'Delete an A1 policy'
+      tags:
+      - Individual a1policy Object
+      responses:
+        204:
+          description: 'The A1 policy was deleted'
+        404:
+          "$ref": "#/components/responses/404-NotFound"
+        429:
+          "$ref": "#/components/responses/429-TooManyRequests"
+        503:
+          "$ref": "#/components/responses/503-ServiceUnavailable"
+
+components:
+  schemas:
+    #
+    # Representation objects
+    #
+    A1PolicyObject:
+      title: 'Title'
+      description: 'A generic A1 policy object'
+      type: object
+
+    ProblemDetails:
+      description: 'A problem detail to carry details in a HTTP response according to RFC 7807'
+      type: object
+      properties:
+        type:
+          type: string
+        title:
+          type: string
+        status:
+          type: number
+        detail:
+          type: string
+        instance:
+          type: string
+
+    #
+    # Simple data types
+    #
+    JsonSchema:
+      description: 'A JSON schema following http://json-schema.org/draft-07/schema'
+      type: object
+
+    A1PolicyId:
+      description: 'A1 policy identifier.'
+      type: string
+
+  responses:
+    400-BadRequest:
+      description: 'A1 policy not properly formulated or not related to the method'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    404-NotFound:
+      description: 'No resource found at the URI'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    405-MethodNotAllowed:
+      description: 'Method not allowed for the URI'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    409-Conflict:
+      description: 'Request could not be processed in the current state of the resource'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    429-TooManyRequests:
+      description: 'Too many requests have been sent in a given amount of time'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    503-ServiceUnavailable:
+      description: 'The provider is currently unable to handle the request due to a temporary overload'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
+
+    507-InsufficientStorage:
+      description: 'The method could not be performed on the resource because the provider is unable to store the representation needed to successfully complete the request'
+      content:
+        application/problem+json:
+          schema:
+            "$ref": "#/components/schemas/ProblemDetails"
index d7e139d..4a9448a 100755 (executable)
@@ -20,7 +20,7 @@ The O-RAN SC external server is an extension for Near-RealTime RIC simulator. It
 The details of API definitions are being explained below:
 
 .. Generates content from EXT_SRV_api.yaml
-.. openapi:: ../near-rt-ric-simulator/test/EXT_SRV/api/EXT_SRV_api.yaml
+.. openapi:: ../api/EXT_SRV_api.yaml
 
 
 Admin Functions
index c017513..97f2a0f 100755 (executable)
@@ -89,7 +89,7 @@ fi
 # Runs kafka server in detached mode
 # In order to tail logs use:: docker logs -f kafkamessagedispatcher
 if [ ! -z "$URL" ]; then
-    docker run -d --network host --rm -it -p 7075:7075 -p 7175:7175 -e ALLOW_HTTP=true -e MSG_BROKER_URL=localhost:9092 -e KAFKA_TOPIC_RES=kafkatopicres -e TIME_OUT=30000 --volume "$dirkafkasrv/certificate:/usr/src/app/cert" --name kafkamessagedispatcher kafka_dispatcher
+    docker run -d --network host --rm -it -p 7075:7075 -p 7175:7175 -e ALLOW_HTTP=true -e MSG_BROKER_URL=localhost:9092 -e TIME_OUT=30 --volume "$dirkafkasrv/certificate:/usr/src/app/cert" --name kafkamessagedispatcher kafka_dispatcher
 fi
 
 # Runs A1 simulator