A1 Policy Management 78/125978/2
authorPatrikBuhr <patrik.buhr@est.tech>
Tue, 30 Nov 2021 10:25:17 +0000 (11:25 +0100)
committerPatrikBuhr <patrik.buhr@est.tech>
Tue, 30 Nov 2021 14:02:13 +0000 (15:02 +0100)
API documentation updates.

Issue-ID: CCSDK-3495
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Change-Id: Ib4f5cfd437a1bad99528d19dcec61f6dc521593b

a1-policy-management/api/pms-api.json
a1-policy-management/api/pms-api.yaml
a1-policy-management/config/application.yaml
docs/offeredapis/swagger/pms-api.yaml

index 88196a9..a8a444f 100644 (file)
                     "enum": ["AVAILABLE"]
                 }
             }
+        },
+        "Link": {
+            "type": "object",
+            "properties": {
+                "templated": {"type": "boolean"},
+                "href": {"type": "string"}
+            }
         }
     }},
     "openapi": "3.0.1",
             }},
             "tags": ["Health Check"]
         }},
+        "/actuator/threaddump": {"get": {
+            "summary": "Actuator web endpoint 'threaddump'",
+            "operationId": "handle_2_1_3",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/services": {
             "get": {
                 "summary": "Returns service information",
             ],
             "tags": ["NearRT-RIC Repository"]
         }},
+        "/actuator/loggers": {"get": {
+            "summary": "Actuator web endpoint 'loggers'",
+            "operationId": "handle_6",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/actuator/health/**": {"get": {
+            "summary": "Actuator web endpoint 'health-path'",
+            "operationId": "handle_12",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/a1-policy/v2/policy-types": {"get": {
             "summary": "Query policy type identities",
             "operationId": "getPolicyTypes_1",
                 "tags": ["A1 Policy Management"]
             }
         },
+        "/actuator/metrics/{requiredMetricName}": {"get": {
+            "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
+            "operationId": "handle_5",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "requiredMetricName",
+                "required": true
+            }],
+            "tags": ["Actuator"]
+        }},
         "/a1-policy/v2/configuration": {
             "get": {
                 "summary": "Returns the contents of the configuration file",
                 "tags": ["A1 Policy Management V1.0"]
             }
         },
+        "/actuator": {"get": {
+            "summary": "Actuator root web endpoint",
+            "operationId": "links_1",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {
+                    "additionalProperties": {
+                        "additionalProperties": {"$ref": "#/components/schemas/Link"},
+                        "type": "object"
+                    },
+                    "type": "object"
+                }}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/policies": {"get": {
             "summary": "Query policies",
             "operationId": "getPolicies",
             ],
             "tags": ["A1 Policy Management V1.0"]
         }},
+        "/actuator/loggers/{name}": {
+            "post": {
+                "summary": "Actuator web endpoint 'loggers-name'",
+                "operationId": "handle_0",
+                "responses": {"200": {
+                    "description": "OK",
+                    "content": {"*/*": {"schema": {"type": "object"}}}
+                }},
+                "parameters": [{
+                    "schema": {"type": "string"},
+                    "in": "path",
+                    "name": "name",
+                    "required": true
+                }],
+                "tags": ["Actuator"]
+            },
+            "get": {
+                "summary": "Actuator web endpoint 'loggers-name'",
+                "operationId": "handle_7",
+                "responses": {"200": {
+                    "description": "OK",
+                    "content": {"*/*": {"schema": {"type": "object"}}}
+                }},
+                "parameters": [{
+                    "schema": {"type": "string"},
+                    "in": "path",
+                    "name": "name",
+                    "required": true
+                }],
+                "tags": ["Actuator"]
+            }
+        },
         "/a1-policy/v2/services/{service_id}/keepalive": {"put": {
             "summary": "Heartbeat indicates that the service is running",
             "description": "A registerred service must call this in regular intervals to indicate that it is in operation. Absence of this call will lead to that teh service will be deregisterred and all its policies are removed.",
             }],
             "tags": ["A1 Policy Management V1.0"]
         }},
+        "/actuator/metrics": {"get": {
+            "summary": "Actuator web endpoint 'metrics'",
+            "operationId": "handle_4",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/policy_status": {"get": {
             "summary": "Returns a policy status",
             "operationId": "getPolicyStatus",
                 "tags": ["Service Registry and Supervision"]
             }
         },
+        "/actuator/info": {"get": {
+            "summary": "Actuator web endpoint 'info'",
+            "operationId": "handle_9",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/ric": {"get": {
             "summary": "Returns the name of a RIC managing one Mananged Element",
             "operationId": "getRic",
             }],
             "tags": ["A1 Policy Management"]
         }},
+        "/actuator/logfile": {"get": {
+            "summary": "Actuator web endpoint 'logfile'",
+            "operationId": "handle_8",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/actuator/health": {"get": {
+            "summary": "Actuator web endpoint 'health'",
+            "operationId": "handle_11",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/a1-policy/v2/policies": {
             "get": {
                 "summary": "Query policy identities",
                 "required": true
             }],
             "tags": ["A1 Policy Management"]
+        }},
+        "/actuator/heapdump": {"get": {
+            "summary": "Actuator web endpoint 'heapdump'",
+            "operationId": "handle_10",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
         }}
     },
     "info": {
         {"name": "NearRT-RIC Repository"},
         {"name": "Service Registry and Supervision"},
         {"name": "Health Check"},
-        {"name": "Callbacks"}
+        {"name": "Callbacks"},
+        {
+            "name": "Actuator",
+            "description": "Monitor and interact",
+            "externalDocs": {
+                "description": "Spring Boot Actuator Web API Documentation",
+                "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
+            }
+        }
     ]
 }
\ No newline at end of file
index 6d62b0c..c827468 100644 (file)
@@ -35,6 +35,11 @@ tags:
 - name: Service Registry and Supervision
 - name: Health Check
 - name: Callbacks
+- name: Actuator
+  description: Monitor and interact
+  externalDocs:
+    description: Spring Boot Actuator Web API Documentation
+    url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
 paths:
   /policy_types:
     get:
@@ -135,6 +140,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/status_info_v2'
+  /actuator/threaddump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'threaddump'
+      operationId: handle_2_1_3
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /services:
     get:
       tags:
@@ -232,6 +250,32 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/loggers:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers'
+      operationId: handle_6
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator/health/**:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'health-path'
+      operationId: handle_12
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/policy-types:
     get:
       tags:
@@ -256,14 +300,6 @@ paths:
         explode: true
         schema:
           type: string
-      - name: regexp
-        in: query
-        description: Select types with type identity that matches a regular expression.
-        required: false
-        style: form
-        explode: true
-        schema:
-          type: string
       - name: compatible_with_version
         in: query
         description: Select types that are compatible with the given version. This
@@ -352,6 +388,27 @@ paths:
             '*/*':
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/metrics/{requiredMetricName}:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'metrics-requiredMetricName'
+      operationId: handle_5
+      parameters:
+      - name: requiredMetricName
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/configuration:
     get:
       tags:
@@ -552,6 +609,23 @@ paths:
             '*/*':
               schema:
                 type: string
+  /actuator:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator root web endpoint
+      operationId: links_1
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+                additionalProperties:
+                  type: object
+                  additionalProperties:
+                    $ref: '#/components/schemas/Link'
   /policies:
     get:
       tags:
@@ -598,6 +672,47 @@ paths:
             '*/*':
               schema:
                 type: string
+  /actuator/loggers/{name}:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers-name'
+      operationId: handle_7
+      parameters:
+      - name: name
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+    post:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers-name'
+      operationId: handle_0
+      parameters:
+      - name: name
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/services/{service_id}/keepalive:
     put:
       tags:
@@ -686,6 +801,19 @@ paths:
             '*/*':
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/metrics:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'metrics'
+      operationId: handle_4
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /policy_status:
     get:
       tags:
@@ -884,6 +1012,19 @@ paths:
             '*/*':
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/info:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'info'
+      operationId: handle_9
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /ric:
     get:
       tags:
@@ -980,6 +1121,32 @@ paths:
             '*/*':
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/logfile:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'logfile'
+      operationId: handle_8
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator/health:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'health'
+      operationId: handle_11
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/policies:
     get:
       tags:
@@ -1183,6 +1350,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/heapdump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'heapdump'
+      operationId: handle_10
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
 components:
   schemas:
     error_information:
@@ -1466,3 +1646,10 @@ components:
           enum:
           - AVAILABLE
       description: Information transferred as in Service callbacks (callback_url)
+    Link:
+      type: object
+      properties:
+        templated:
+          type: boolean
+        href:
+          type: string
index d02c0a8..5e6c6fe 100644 (file)
@@ -32,7 +32,8 @@ management:
       exposure:
         # Enabling of springboot actuator features. See springboot documentation.
         include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
-
+springdoc:
+  show-actuator: true
 logging:
   # Configuration of logging
   level:
index 6d62b0c..a8913ec 100644 (file)
@@ -256,14 +256,6 @@ paths:
         explode: true
         schema:
           type: string
-      - name: regexp
-        in: query
-        description: Select types with type identity that matches a regular expression.
-        required: false
-        style: form
-        explode: true
-        schema:
-          type: string
       - name: compatible_with_version
         in: query
         description: Select types that are compatible with the given version. This