[openstack-dev] [Fuel] Swagger documentation

Przemyslaw Kaminski pkaminski at mirantis.com
Wed May 6 05:49:44 UTC 2015


Hello,

I prepared a small PoC of Swagger [1] as a proposal to [2]. If you want
to test it out, checkout that commit into your repo, start Nailgun
locally and point your browser to [3]. Basically you just need to put
Swagger-UI [4] somewhere and point your browser to /dist/index.html
there, filling in the URL. OPTIONS handler with appropriate CORS
settings is required on API side if Swagger UI's host is somewhere else
than the API. I've turned this on when the settings.DEVELOPMENT variable
in API is set to True.

As a demo I modified documentation of LogEntryCollectionHandler.
Basically we should fix our docstrings to comply with [5] and extend &
cleanup my docutils parsing logic in swagger.py. The plus side is that
our Sphinx documentation will get better too.

Please test it and give feedback.

P.

[1] https://review.openstack.org/#/c/179051/
[2] https://bugs.launchpad.net/fuel/+bug/1449030
[3]
http://172.18.163.4/swagger-ui/dist/index.html?url=http://localhost:8000/api/v1/docs#!/default/get_logs
[4] https://github.com/swagger-api/swagger-ui
[5] http://pythonhosted.org/sphinxcontrib-httpdomain/





More information about the OpenStack-dev mailing list