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
It would be very usefull to let the default setter know which field it is.
Use case:
a filter can only have values which depends on the logged in user
if the filter is missing it should default to all the values the user is allowed to pass in
Currently I work around this issue by having the default setter set it to '__all__' and then in the custom validator (which also validates the allowed values), and let it expand to actual default in self.document. Which might break in feature versions.
The text was updated successfully, but these errors were encountered:
Since the field was mandatory in my custom _validate_type_string and _validate_type_date functions, i modify the validator class too. Please leave the field name in the parameters or set a way to get the current processed field name from the Validator class
what about the following design: the callables' signatures are inspected before calling and provided with the parameters as needed. like pytest is injecting fixtures to test functionns.
so, the idea of dependency injection that allows custom signatures is included in the roadmap for the next major release. it will take a while 'til the journey gets there, and this feature has a rather high potential to conflict with the desire to not break too much with a major release.
It would be very usefull to let the default setter know which field it is.
Use case:
Currently I work around this issue by having the default setter set it to
'__all__'
and then in the custom validator (which also validates the allowed values), and let it expand to actual default inself.document
. Which might break in feature versions.The text was updated successfully, but these errors were encountered: