diff options
author | Aashish Sharma <aashishsharma@localhost.localdomain> | 2020-07-29 13:48:21 +0200 |
---|---|---|
committer | Aashish Sharma <aashishsharma@localhost.localdomain> | 2020-08-17 18:51:34 +0200 |
commit | 830f295ebb2dac60bfc0344d1697f1926933bc42 (patch) | |
tree | 9327cc3cee176f0c50cd4807746ad82d97029888 /src/pybind/mgr/dashboard/controllers/docs.py | |
parent | Merge pull request #36605 from rhcs-dashboard/fix-46920-master (diff) | |
download | ceph-830f295ebb2dac60bfc0344d1697f1926933bc42.tar.xz ceph-830f295ebb2dac60bfc0344d1697f1926933bc42.zip |
mgr/dashboard: Placeholders for Documenting REST API
Added summary/description and example value for one endpoint from each component in Rest API Documentation
Fixes:https://tracker.ceph.com/issues/40767
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
Diffstat (limited to 'src/pybind/mgr/dashboard/controllers/docs.py')
-rw-r--r-- | src/pybind/mgr/dashboard/controllers/docs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/controllers/docs.py b/src/pybind/mgr/dashboard/controllers/docs.py index 84de247010c..fce5341193c 100644 --- a/src/pybind/mgr/dashboard/controllers/docs.py +++ b/src/pybind/mgr/dashboard/controllers/docs.py @@ -254,6 +254,7 @@ class Docs(BaseController): @classmethod def _gen_paths(cls, all_endpoints): + # pylint: disable=R0912 method_order = ['get', 'post', 'put', 'delete'] paths = {} for path, endpoints in sorted(list(ENDPOINT_MAP.items()), @@ -305,6 +306,13 @@ class Docs(BaseController): 'application/json': { 'schema': cls._gen_schema_for_content(body_params)}}} + if endpoint.query_params: + query_params = cls._add_param_info(endpoint.query_params, p_info) + methods[method.lower()]['requestBody'] = { + 'content': { + 'application/json': { + 'schema': cls._gen_schema_for_content(query_params)}}} + if endpoint.is_secure: methods[method.lower()]['security'] = [{'jwt': []}] |