From: halil.cakal Date: Thu, 28 Jul 2022 12:48:09 +0000 (+0100) Subject: Revert sphinxcontribopenapi back to redoc docs X-Git-Tag: 1.0.0~4 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=dd12c0e3e249def20c2f27af8767b2ef98b4f0d1;p=nonrtric%2Fplt%2Frappcatalogue.git Revert sphinxcontribopenapi back to redoc docs Issue-ID: NONRTRIC-777 Change-Id: I87dc5c4ab57797d9154067f95ee8613cdcfa0412 Signed-off-by: halil.cakal --- diff --git a/api/rac-api.json b/api/rac-api.json index a6615f0..64f19d8 100644 --- a/api/rac-api.json +++ b/api/rac-api.json @@ -26,16 +26,7 @@ "items": { "$ref": "#/components/schemas/service" } - }, - "example": [ - { - "name": "DroneIdentifier", - "version": "1.0.0", - "display_name": "Drone Identifier", - "description": "Detects if a UE is a drone", - "registrationDate": "2020-11-03" - } - ] + } } } } @@ -57,13 +48,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/service" - }, - "example": { - "name": "DroneIdentifier", - "version": "1.0.0", - "display_name": "Drone Identifier", - "description": "Detects if a UE is a drone", - "registrationDate": "2020-11-03" } } } @@ -74,10 +58,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/error_information" - }, - "example": { - "detail": "Service not found", - "status": 404 } } } @@ -151,11 +131,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/inputService" - }, - "example": { - "version": "1.0.0", - "display_name": "Drone Identifier", - "description": "Detects if a UE is a drone" } } } diff --git a/docs/api-docs.rst b/docs/api-docs.rst index bea573b..f41a8c5 100644 --- a/docs/api-docs.rst +++ b/docs/api-docs.rst @@ -23,6 +23,8 @@ Non-RT-RIC App Catalogue (Initial) The Service Catalogue provides a way for services to register themselves for other services to discover. +See `App Catalogue API <./rac-api.html>`_ for full details of the API. + The API is also described in Swagger-JSON and YAML: @@ -31,7 +33,3 @@ The API is also described in Swagger-JSON and YAML: :widths: 10,5, 5 "App Catalogue API", ":download:`link <../api/rac-api.json>`", ":download:`link <../api/rac-api.yaml>`" - -.. Generates content from rac-api.json -.. openapi:: ../api/rac-api.json - :examples: diff --git a/docs/conf.py b/docs/conf.py index e14099c..3b17ba7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,25 +13,18 @@ linkcheck_ignore = [ './rac-api.html', #Generated file that doesn't exist at link check. ] -#extensions = ['sphinxcontrib.redoc', 'sphinx.ext.intersphinx',] - -extensions = [ - # ... - #'sphinxcontrib.redoc', - 'sphinxcontrib.openapi', - 'sphinx.ext.intersphinx', -] - -#redoc = [ - #{ - #'name': 'RAC API', - #'page': 'rac-api', - #'spec': '../api/rac-api.json', - #'embed': True, - #} - #] - -#redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js' +extensions = ['sphinxcontrib.redoc', 'sphinx.ext.intersphinx',] + +redoc = [ + { + 'name': 'RAC API', + 'page': 'rac-api', + 'spec': '../api/rac-api.json', + 'embed': True, + } + ] + +redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js' #intershpinx mapping with other projects intersphinx_mapping = {} diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index da9a22e..8f65cbd 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,7 +1,3 @@ sphinx sphinxcontrib-redoc lfdocs-conf -sphinxcontrib-httpdomain -sphinxcontrib-openapi==0.6.0 -sphinx-rtd-theme -recommonmark diff --git a/tox.ini b/tox.ini index 7e40dca..2705e16 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ envlist = skipsdist = true [testenv:docs] -basepython = python3.8 +basepython = python3 deps = -r{toxinidir}/docs/requirements-docs.txt commands = @@ -32,6 +32,6 @@ commands = whitelist_externals = echo [testenv:docs-linkcheck] -basepython = python3.8 +basepython = python3 deps = -r{toxinidir}/docs/requirements-docs.txt commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck