From 1debd9856565905439ae56f2cfdc16b0549055ec Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 1 Feb 2021 17:53:27 +0800 Subject: [PATCH] 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 --- doc/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 8ba08573ae7d2..4dc4b81c43877 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): -- 2.39.5