doc: silence warnings from openapi sphinx extension

it prints out

skipping non-JSON example generation.

if an API does not contains example while ":example:" is specified for
openapi extension, and if this API is not a GET request, openapi
extention complains.

see also
9dbae9c9a6/sphinxcontrib/openapi/openapi30.py (L191)

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-02-01 17:53:27 +08:00
parent 639fac3564
commit 1debd98565

View File

@ -1,4 +1,5 @@
import fileinput
import logging
import os
import shutil
import sys
@ -213,6 +214,10 @@ for c in pybinds:
if pybind not in sys.path:
sys.path.insert(0, pybind)
# openapi
openapi_logger = logging.getLogger('sphinxcontrib.openapi.openapi30')
openapi_logger.setLevel(logging.WARNING)
# handles edit-on-github and old version warning display
def setup(app):