[openstack-dev] [api] API Definition Formats

michael mccune msm at redhat.com
Mon Feb 2 16:35:21 UTC 2015


On 02/02/2015 10:26 AM, Chris Dent wrote:
> pecan-swagger looks cool but presumably pecan has most of the info
> you're putting in the decorators in itself already? So, given an
> undecorated pecan app, would it be possible to provide it to a function
> and have that function output all the paths?
>

you are correct, pecan is storing most of the information we want in 
it's controller metadata. i am working on the next version of 
pecan-swagger now that will reduce the need for so many decorators, and 
instead pull the endpoint information out of the pecan based controller 
classes.

in terms of having a completely undecorated pecan app, i'm not sure 
that's possible just yet due to the object-dispatch routing used by 
pecan. in the next version of pecan-swagger i'm going to reduce the 
deocrators to only be needed on controller classes, but i'm not sure 
that it will be possible to reduce further as there will need to be some 
way to learn the route path hierarchy.

i suppose in the future it might be advantageous to create a pecan 
controller base class that could help inform the routing structure, but 
this would still need to be added to current pecan projects.


mike



More information about the OpenStack-dev mailing list