sanic-org / sanic-openapi

Easily document your Sanic API with a UI

Home Page:https://sanic-openapi.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A little question of decorator

sunhailin-Leo opened this issue · comments

When @doc decorator is front of the @cross_origin (Sanic-Cors), @doc will not effect. 😳

If like this @doc will not effect.
_20180327214147

When i change like this it work.
_20180327214249

commented

the problem is the code is building up a dict (route_specs) using function as the key, adding a decorator before these decorators changes the function (as it's wrapped) so when its building out the final structure it's only finding the pre wrapped ones.

this and others we could fix post #58 hint hint @ahopkins :)

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions.