]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Generate Open API Spec info 26227/head
authorTina Kallio <tina.kallio@gmail.com>
Fri, 28 Dec 2018 17:03:53 +0000 (18:03 +0100)
committerTina Kallio <tina.kallio@gmail.com>
Fri, 22 Feb 2019 08:44:37 +0000 (09:44 +0100)
commitc40520022ac8f1a8d468ef86d0066d304eb6570b
tree2d69595f3bb73399b1ed9d4603e83ed2b35ccae8
parentf6ca8e0c4d3d9a77c655c45be979b032200b24f3
mgr/dashboard: Generate Open API Spec info

Fixes: http://tracker.ceph.com/issues/24763
Makes it possible for developers to provide information of
endpoints and controllers in decorators.
If information is provided it is transposed to fit Open
API Specification and displayed on Swagger UI page.

Features:
Possible to generate group (=tag) descriptions for controllers.
Possible to assign controller to another group.
Possible to generate descriptions for endpoints.
Possible to assign endpoints to another group.
Possible to generate type + description for responses.
Possible to generate type + description for path/query parameter.
Possible to generate type + description for request body parameters.
Body parameters and responses can be primitive types, dictionaries,
lists of primitive types and dictionaries in dictionaries, lists or
tuples, as well as combinations of these types.

Signed-off-by: Tina Kallio <tina.kallio@gmail.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/controllers/__init__.py
src/pybind/mgr/dashboard/controllers/docs.py
src/pybind/mgr/dashboard/tests/test_docs.py [new file with mode: 0644]