@@ -80,16 +80,6 @@ def get_return_binding(binding_name: str,
80
80
81
81
return return_binding_name
82
82
83
- @staticmethod
84
- def validate_binding_route (func_name : str , binding : BindingInfo ,
85
- func_type : str ):
86
- if hasattr (binding , 'route' ) and binding .route .startswith (
87
- '/' ) and func_type == 'function' :
88
- raise FunctionLoadError (
89
- func_name ,
90
- f'Invalid route name: { binding .route } . Route name cannot begin'
91
- f' with a /' )
92
-
93
83
@staticmethod
94
84
def validate_binding_direction (binding_name : str ,
95
85
binding_direction : str ,
@@ -105,14 +95,6 @@ def validate_binding_direction(binding_name: str,
105
95
func_name ,
106
96
'"$return" binding must have direction set to "out"' )
107
97
108
- def validate_binding (self , func_name : str , binding : BindingInfo ,
109
- func_type : str ):
110
- self .validate_binding_route (func_name , binding , func_type )
111
-
112
- self .validate_binding_direction (binding .name ,
113
- binding .direction ,
114
- func_name )
115
-
116
98
@staticmethod
117
99
def is_context_required (params , bound_params : dict ,
118
100
annotations : dict ,
@@ -377,7 +359,6 @@ def add_function(self, function_id: str,
377
359
def add_indexed_function (self , function ):
378
360
func = function .get_user_function ()
379
361
func_name = function .get_function_name ()
380
- func_type = function .http_type
381
362
function_id = str (uuid .uuid5 (namespace = uuid .NAMESPACE_OID ,
382
363
name = func_name ))
383
364
return_binding_name : typing .Optional [str ] = None
@@ -391,7 +372,9 @@ def add_indexed_function(self, function):
391
372
392
373
bound_params = {}
393
374
for binding in function .get_bindings ():
394
- self .validate_binding (func_name , binding , func_type )
375
+ self .validate_binding_direction (binding .name ,
376
+ binding .direction ,
377
+ func_name )
395
378
396
379
has_explicit_return , has_implicit_return = \
397
380
self .get_explicit_and_implicit_return (
0 commit comments