Replies: 1 comment
-
I've ended up creating a second plugin that inherits from the marshmallow plugin and added it to get the desired behaviour:
and can be added to the APiFlask init:
The plugin is capable of handling the marshmallow Union field.. It's an adaptation of this solution : marshmallow-code/apispec#837 for apiflask It's a bit of a hacky solution, so if there's a 'correct' way to do this, I'd be interested in hearing it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The MarshmallowPlugin is automatically added to the ApiSpec generated inside ApiFlask. It is not listed in self.spec_plugins.
I was wondering if there is a way to access it and to add an attribute function somehow?
If not is there a way to ensure that the marshmallow plugin you pass as an argument is used over the pre-defined one?
regards
myrti
Beta Was this translation helpful? Give feedback.
All reactions