[openstack-dev] [API] os-api-ref HTTP Response code formating

Hayes, Graham graham.hayes at hpe.com
Wed May 18 18:42:41 UTC 2016


I was moving Designate to the os-api-ref extension, and I spotted
something I thought we could do to improve the readability.

Currently we have the HTTP Response Codes as a single
line on the page - I thought a table might be handy as well.

So, I had a go at it - and put up a POC[0]

It outputs a table with the code and the project reason for the code[1]

Example syntax is (used to generate [1]):

     Response Codes
     --------------

     Normal
     ^^^^^^

     .. rest_response::

        - 200: OK
        - 100: Foo
        - 201: Zone Created



     Error
     ^^^^^

     .. rest_response::

        - 405: Method *must* be POST
        - 403: Policy does not allow current user to create zone
        - 401: User must authenticate
        - 400: Supplied data is malformed.
        - 500: Something went wrong

Is this something worth pursuing? Should it be laid out differently?

Thanks,

-- Graham

0 - https://review.openstack.org/#/c/318281/1
1 - http://i.imgur.com/onsRFtI.png



More information about the OpenStack-dev mailing list