forked from dmpayton/foaas-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Because of dynamically created methods, the arguments passed by a user, are stored within a dictionary thus in case irrelevant arguments are passed, two scenarios may occur:
- The size of the dictionary increases thus various checks may fail
- These arguments are passed to methods that cannot handle them thus exceptions may occur
A possible solution to this problem may be the following:
Create a method within the FuckingOperations() class that fetch all the available fields that can be used, from the /operations json and store them within a HashSet. Afterwards, for every method call, all the arguments should be checked against that HashSet for existence. In case an argument doesn't exists, warn the user and exit the method without making an HTTP call to the framework.
An example of such a case could be the following:
>>>from foaas.foaas_client import Fuck
>>>f = Fuck()
>>>print(f.that(arg1_="an argument").text)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request