-
-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Description
APIFlask currently doesn't allow including a custom APISpec plugin.
The suggestion is to add such feature to APIFlask. It would look like this (param name is negotiable):
app = APIFlask(
...,
apispec_plugins=[SomeCustomPlugin()],
)And the code change according to proposed feature would look like this:
class APIFlask(APIScaffold, Flask):
...
# pass plugins list all the way through APIFlask __init__()
# or instead it could be assigned as instance attribute on __init__() and used as self.plugins then
def _generate_spec(self, plugins: list[apispec.BasePlugin]) -> APISpec:
...
spec: APISpec = APISpec(
...,
plugins=[ma_plugin, *plugins],
...,
)
...
...Reactions are currently unavailable