Closed AdamVerner closed 2 years ago
I don't like the idea of exposing the endpoints, because they are extremely basic and do not support any configuration. What I think makes more sense is to allow the application to attach decorators to them, which is a pattern that already exists in Flask with the class-based views.
I have added the APIFAIRY_UI_DECORATORS
and APIFAIRY_APISPEC_DECORATORS
for this purpose. Both are lists of decorators that are applied in the order given to the default endpoints.
i would love to expose the API documentation out, but only for authenticated users.
currently hacked it around like this
it would be nice, if the render functions
json
anddoc
fromAPIFairy.create_app
were exposed (even as underscore functions) so they could be used from the outside to add the required authentication, caching and so on.