Fix offeredapi documentation 34/134134/1
authorlapentafd <francesco.lapenta@est.tech>
Fri, 14 Apr 2023 09:05:26 +0000 (10:05 +0100)
committerFrancesco Davide Lapenta <francesco.lapenta@est.tech>
Fri, 14 Apr 2023 09:31:58 +0000 (09:31 +0000)
Deleted repeted lines.
Fixed missing body in Post requests in the generated swagger pages,
added OpenApi 3 support.

Issue-ID: POLICY-4581
Change-Id: Id7558efeb210457e4e9c79df5e6e155d1525d3d4
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
docs/conf.py
docs/offeredapis.rst

index 367166b..a43b305 100644 (file)
@@ -27,13 +27,14 @@ extensions = [
     'sphinxcontrib.redoc'
 ]
 
+redoc_uri = 'https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js'
+
 redoc = [
     {
         'name': 'Policy API',
         'page': 'api/local-swagger',
         'spec': 'https://raw.githubusercontent.com/onap/policy-api/master/main/src/main/resources/openapi/openapi.yaml',
         'opts': {
-            'lazy-rendering': True,
             'suppress-warnings': True,
             'hide-hostname': True,
         }
@@ -43,7 +44,6 @@ redoc = [
         'page': 'pap/local-swagger',
         'spec': 'https://raw.githubusercontent.com/onap/policy-pap/master/main/src/main/resources/openapi/openapi.yaml',
         'opts': {
-            'lazy-rendering': False,
             'suppress-warnings': True,
             'hide-hostname': True,
         }
@@ -53,7 +53,15 @@ redoc = [
         'page': 'xacml/local-swagger',
         'spec': 'https://raw.githubusercontent.com/onap/policy-xacml-pdp/master/main/src/main/resources/openapi/openapi.yaml',
         'opts': {
-            'lazy-rendering': False,
+            'suppress-warnings': True,
+            'hide-hostname': True,
+        }
+    },
+    {
+        'name': 'Policy DROOLS',
+        'page': 'drools/local-swagger',
+        'spec': 'https://raw.githubusercontent.com/onap/policy-drools-pdp/master/feature-healthcheck/src/main/resources/openapi/openapi.yaml',
+        'opts': {
             'suppress-warnings': True,
             'hide-hostname': True,
         }
@@ -63,7 +71,6 @@ redoc = [
         'page': 'clamp/acm/api-protocol/local-swagger',
         'spec': 'https://raw.githubusercontent.com/onap/policy-clamp/master/runtime-acm/src/main/resources/openapi/openapi.yaml',
         'opts': {
-            'lazy-rendering': False,
             'suppress-warnings': True,
             'hide-hostname': True,
         }
index a9e34cc..6bf3a6b 100644 (file)
@@ -53,9 +53,9 @@ OAS 3.0 is used to describe the API contracts, and those documents are added as
 
 `Swagger Specification for Policy XACML-PDP <./xacml/local-swagger.html>`_
 
-`Swagger Specification for Policy ACM-R <./clamp/acm/api-protocol/local-swagger.html>`_
+`Swagger Specification for Policy DROOLS-PDP <./drools/local-swagger.html>`_
 
-`Swagger Specification for Policy DROOLS-PDP <https://github.com/onap/policy-drools-pdp/blob/master/feature-healthcheck/src/main/resources/openapi/openapi.yaml>`_
+`Swagger Specification for Policy ACM-R <./clamp/acm/api-protocol/local-swagger.html>`_
 
 
 The YAML document can be also downloaded and imported in an web editor such as `Editor Swagger <https://editor.swagger.io/>`_
@@ -67,9 +67,3 @@ An "OpenApi first" approach is adopted, so starting from the Swagger document we
   For Example ACM-Runtime endpoint
 
   ``http://<IP>:<PORT>/onap/policy/clamp/acm/v3/api-docs``
-
- The Swagger document can still be extracted from the code in the API that uses *Spring-Doc* dependency at the endpoint "../v3/api-docs/"
-  For Example ACM-Runtime endpoint
-
-  ``http://<IP>:<PORT>/onap/policy/clamp/acm/v3/api-docs``
-