aiohttp-apispec
aiohttp-apispec copied to clipboard
Custom fields for marshmallow plugin
Hello!
I've spend some time and cannot figure out, how to register custom fields for apispec
through aiohttp-apispec
library.
Docs about this at apispec
:
https://apispec.readthedocs.io/en/latest/using_plugins.html#custom-fields
But MarshmallowPlugin
created inside AiohttpApiSpec
and not exposed explicitly.
What do you think about instantiating MarshmallowPlugin
at module level or put into global context? It will allows me to import this plugin and decorate my own custom fields.
Thanks for your attention!
@maximdanilchenko what do you think about this? Should I prepare PR for this case?
@prokaktus, hi!
Yes, I think that instantiating MarshmallowPlugin at module level is a good idea. You can make a PR, it would be great.
Hi! Any progress on this?