Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def api_decorator(self, view_func, rule=None, **options):
http_methods = self.api_http_method(options)
if rule not in self.api.url_map:
self.add_url_rule(rule + '__doc', rule + ' DOC', doc_ui)
self.add_url_rule(rule + '__exe', rule + ' EXE', exe_ui)
rule = self.api_rule(view_func, http_methods, rule=rule)
endpoint = self.api_endpoint(rule, http_methods, options)
self.add_url_rule(rule, endpoint, view_func, **options)
view_func.meta = Meta(self.api, view_func, rule, http_methods)