[openstack-dev] [nova] [doc] How to support Microversions and Actions in Swagger Spec

Alex Xu soulxu at gmail.com
Fri Nov 6 03:31:28 UTC 2015


Hi, folks

Nova API sub-team is working on the swagger generation. And there is PoC
https://review.openstack.org/233446

But before we are going to next step, I really hope we can get agreement
with how to support Microversions and Actions. The PoC have demo about
Microversions. It generates min version action as swagger spec standard,
for the other version actions, it named as extended attribute, like:

{
    '/os-keypairs': {
        "get": {
            'x-start-version': '2.1',
            'x-end-version': '2.1',
            'description': '....',
           ....
        },
        "x-get-2.2-2.9": {
            'x-start-version': '2.2',
            'x-end-version': '2.9',
            'description': '....',
            .....
        }
    }
}

x-start-version and x-end-version are the metadata for Microversions, which
should be used by UI code to parse.

This is just based on my initial thought, and there is another thought is
generating a set full swagger specs for each Microversion. But I think how
to show Microversions and Actions should be depended how the doc UI to
parse that also.

As there is doc project to turn swagger to UI:
https://github.com/russell/fairy-slipper  But it didn't support
Microversions. So hope doc team can work with us and help us to find out
format to support Microversions and Actions which good for UI parse and
swagger generation.

Any thoughts folks?

Thanks
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151106/66d31a9c/attachment.html>


More information about the OpenStack-dev mailing list