add support for common swagger style 79/111979/2
authordhebeha <dhebeha.mj71@wipro.com>
Tue, 1 Sep 2020 13:44:40 +0000 (19:14 +0530)
committerdhebeha <dhebeha.mj71@wipro.com>
Mon, 7 Sep 2020 13:05:13 +0000 (18:35 +0530)
  - add support for redoc

Issue-ID: OPTFRA-805
Signed-off-by: dhebeha <dhebeha.mj71@wipro.com>
Change-Id: I2ce1259a9d8f84ec1386518dbe1f286babc26d87

docs/api/swagger/oof-optf-opteng-api.json [moved from docs/sections/swaggerdoc/oof-optf-opteng-api.json with 100% similarity]
docs/api/swagger/oof-osdf-has-api.json [moved from docs/sections/swaggerdoc/oof-osdf-has-api.json with 99% similarity]
docs/conf.py
docs/requirements-docs.txt
docs/sections/offeredapis.rst

similarity index 99%
rename from docs/sections/swaggerdoc/oof-osdf-has-api.json
rename to docs/api/swagger/oof-osdf-has-api.json
index 7289ef4..a2fa43f 100644 (file)
         },
         "preferReuse": {
           "type": "boolean",
-         "description": "true if reusing an existing NSI is preferred/false if creating a new NSI is preferred "
+      "description": "true if reusing an existing NSI is preferred/false if creating a new NSI is preferred "
         },
         "subnetCapabilities": {
           "type": "array",
       "properties": {
         "type": {
           "type": "string",
-         "enum": [
-            "NSI", 
-            "NSSI"       
+      "enum": [
+         "NSI", 
+         "NSSI"      
            ],
           "description": "indicates if the request is for NSI/NSSI termination"
         },
       "properties": {
         "existingNSI": {
           "type": "boolean",
-         "description": "true if NSISolution object has shareNSISolution/false if NSISolution object has newNSISolution"
+      "description": "true if NSISolution object has shareNSISolution/false if NSISolution object has newNSISolution"
         },
         "sharedNSISolution": {
           "$ref": "#/definitions/SharedNSISolution"
index 5371015..59016f1 100644 (file)
@@ -7,6 +7,27 @@ linkcheck_ignore = [
     'http://localhost',
 ]
 
+extensions = [
+   'sphinxcontrib.redoc',
+]
+
+redoc = [
+                   {
+                       'name': 'OSDF API',
+                       'page': './osdf-api',
+                       'spec': './api/swagger/oof-osdf-has-api.json',
+                       'embed': True,
+                   },
+                   {
+                       'name': 'OPTENG API',
+                       'page': './opteng-api',
+                       'spec': './api/swagger/oof-osdf-has-api.json',
+                       'embed': True,
+                   }
+        ]
+
+redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js'
+
 intersphinx_mapping = {}
 
 html_last_updated_fmt = '%d-%b-%y %H:%M'
index b3188dd..1cb2382 100644 (file)
@@ -12,4 +12,5 @@ sphinxcontrib-seqdiag
 sphinxcontrib-swaggerdoc
 sphinxcontrib-plantuml
 sphinx_bootstrap_theme
+sphinxcontrib-redoc
 lfdocs-conf
index 8269dea..c74b1b1 100644 (file)
@@ -20,11 +20,15 @@ paste into the swagger tool here: https://editor.swagger.io
 
 OOF OSDF HAS API
 ................
-.. swaggerv2doc:: ./swaggerdoc/oof-osdf-has-api.json
+.. raw:: html
+
+    <a class="reference internal" href="../osdf-api.html">OSDF API</a>
+
 
 
 OOF OPTENG API
 ..............
-.. swaggerv2doc:: ./swaggerdoc/oof-optf-opteng-api.json
+.. raw:: html
 
+    <a class="reference internal" href="../opteng-api.html">OPTENG API</a>