flask-accept icon indicating copy to clipboard operation
flask-accept copied to clipboard

Multiple resources using Flask Restful

Open tcco opened this issue 6 years ago • 1 comments

Is there an ability use the support decorator on a method from a different Flask Restful resource?

i.e.

class Health(Resource):
    @accept_fallback
    def get(self):
        return {'success': True}

class Health2(Resource):
    @Health.get.support('application/v2')
    def get2(self):
        return {'success': False}

tcco avatar Aug 12 '18 06:08 tcco

I don't see any reason why this wouldn't work, but I'm not too familiar with Flask-Restful. Have you tried it?

Perhaps @TheMourningDawn would be able to chime in here, they added the support for Flask-Restful to this package.

di avatar Aug 13 '18 15:08 di