From: Kefu Chai Date: Mon, 1 Feb 2021 09:53:27 +0000 (+0800) Subject: doc: silence warnings from openapi sphinx extension X-Git-Tag: v17.1.0~3102^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1debd9856565905439ae56f2cfdc16b0549055ec;p=ceph-ci.git 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 https://github.com/sphinx-contrib/openapi/blob/9dbae9c9a65291c44b27041c63ded1b20611a2fc/sphinxcontrib/openapi/openapi30.py#L191 Signed-off-by: Kefu Chai --- diff --git a/doc/conf.py b/doc/conf.py index 8ba08573ae7..4dc4b81c438 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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):