From: dhebeha Date: Tue, 1 Sep 2020 13:44:40 +0000 (+0530) Subject: add support for common swagger style X-Git-Tag: 3.0.0~7^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=1668918950d5590aab82710852257c8f8b89642d;p=optf%2Fosdf.git add support for common swagger style - add support for redoc Issue-ID: OPTFRA-805 Signed-off-by: dhebeha Change-Id: I2ce1259a9d8f84ec1386518dbe1f286babc26d87 --- diff --git a/docs/sections/swaggerdoc/oof-optf-opteng-api.json b/docs/api/swagger/oof-optf-opteng-api.json similarity index 100% rename from docs/sections/swaggerdoc/oof-optf-opteng-api.json rename to docs/api/swagger/oof-optf-opteng-api.json diff --git a/docs/sections/swaggerdoc/oof-osdf-has-api.json b/docs/api/swagger/oof-osdf-has-api.json 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 --- a/docs/sections/swaggerdoc/oof-osdf-has-api.json +++ b/docs/api/swagger/oof-osdf-has-api.json @@ -1676,7 +1676,7 @@ }, "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", @@ -1716,9 +1716,9 @@ "properties": { "type": { "type": "string", - "enum": [ - "NSI", - "NSSI" + "enum": [ + "NSI", + "NSSI" ], "description": "indicates if the request is for NSI/NSSI termination" }, @@ -2004,7 +2004,7 @@ "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" diff --git a/docs/conf.py b/docs/conf.py index 5371015..59016f1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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' diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index b3188dd..1cb2382 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -12,4 +12,5 @@ sphinxcontrib-seqdiag sphinxcontrib-swaggerdoc sphinxcontrib-plantuml sphinx_bootstrap_theme +sphinxcontrib-redoc lfdocs-conf diff --git a/docs/sections/offeredapis.rst b/docs/sections/offeredapis.rst index 8269dea..c74b1b1 100644 --- a/docs/sections/offeredapis.rst +++ b/docs/sections/offeredapis.rst @@ -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 + + OSDF API + OOF OPTENG API .............. -.. swaggerv2doc:: ./swaggerdoc/oof-optf-opteng-api.json +.. raw:: html + OPTENG API