[Openstack-docs] code to build api methods

David Cramer david.cramer at rackspace.com
Tue Oct 22 14:46:59 UTC 2013


On 10/22/2013 09:35 AM, Kersten J Richter wrote:
> Thank you for your response.  
> 
> Forgot the opening request! - added that into the logic.  This specific
> example didn't have any parameters so they are not included.  I will be
> looking at that piece later.

Right. As you transform other examples, you'll notice other things to
build in.

> As to this being a fragment, yes I know that.  Obviously the methods
> need to be put together into a single wadl file.  That is part of my
> question - if I created a program that transformed the first bit of code
> into the second, then is that even helpful?  I don't want to spend time
> on something that isn't going to be useful.

You are indeed on your way to making a wadl. I'm guessing that the JSON
comes from a service you're writing and want to autogenerate wadl for
it? If the source JSON has all the information about the service, then
it should be possible to generate wadl from it. That could then be used
to populate api.openstack.org, be used as a config file for tools like
Repose (http://openrepose.org), etc.

I think next you'd use the url field in your JSON to make the <resource>
element in the wadl and implement support for various kinds of
parameters as needed.

Regards,
David





More information about the Openstack-docs mailing list