You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Thanks for the library. I have what may be a naive question:
I have a scenario in which I'm
using marshmallow-sqlalchemy SQLAlchemySchema along with auto_field
using a custom type, defined creating a class that inherits from sql alchemy's TypeDecorator
using apispec to publish a swagger doc based on the marshmallow schemas
using apispec's marshmallow_plugin.converter.add_attribute_function to add middleware which modifies the openapi spec in certain circumstances. add_attribute_function takes an argument of the marshmallow field (of type Field).
For the most part, this works great. However, I'd like to modify the openapi schema docs when I encounter one of my custom sql alchemy types. However, the following code seems to hide the original type from the downstream consumers when auto_field() is used. Is it possible to somehow identify what the source TypeDecorator class is for an auto_field?
Hey! Thanks for the library. I have what may be a naive question:
I have a scenario in which I'm
SQLAlchemySchema
along withauto_field
TypeDecorator
marshmallow_plugin.converter.add_attribute_function
to add middleware which modifies the openapi spec in certain circumstances.add_attribute_function
takes an argument of the marshmallow field (of typeField
).For the most part, this works great. However, I'd like to modify the openapi schema docs when I encounter one of my custom sql alchemy types. However, the following code seems to hide the original type from the downstream consumers when auto_field() is used. Is it possible to somehow identify what the source TypeDecorator class is for an auto_field?
https://github.com/marshmallow-code/marshmallow-sqlalchemy/pull/83/files
For now, I can stop using auto_field in these cases.
Thanks!
The text was updated successfully, but these errors were encountered: