Open jackton1 opened 3 years ago
The base Service
object inherits from django.forms.BaseForm
. Django Forms allow you pass anything to the data
attribute of __init__
. Making this change likely breaks backwards compatibility as the Service object no longer behaves as expected.
@jackton1 What's the use case for things being more restrict? Base an additional attribute of Service called strict_inputs
that defaults to False
for backwards compatibility would be an acceptable PR?
A common issue here has been running into a bug where the field key provided when invoking the service didn’t match the defined field name and there wasn’t any errors reported since the field wasn’t required.
@jackton1 makes sense - I think we'd have to add a new switch to indicate you wanted that behavior of strict inputs. Personally I know it would break some of the apps without it. How about a PR?
The services shouldn't allow more fields than expected when calling execute
Call
Expectations: Raises an exception