Commit 666ea596 authored by Lionel Morin's avatar Lionel Morin
Browse files

Remove unwanted commentaries

parent b27c2659
......@@ -54,12 +54,6 @@ class ApiBridgeCtrl(ZephirCommonController):
async def http_api(self, request, _session_user):
tiramisu = TiramisuJson(self.tiramisu, remotable='none')
form = [
#{'title': 'Générer une commande',
# 'cmd': 'curl',
# 'type': 'submit'},
#{'title': 'Générer du code Python',
# 'cmd': 'python',
# 'type': 'submit'},
{'title': 'Exécuter',
'cmd': 'ajax',
'type': 'submit'}]
......
......@@ -30,8 +30,6 @@ def _get_option(name,
kwargs = {'name': name,
'doc': _get_description(description, name),
'properties': frozenset(props)}
#if arg.multiple:
# kwargs['multi'] = True
if hasattr(arg, 'default'):
kwargs['default'] = arg.default
type_ = arg.type
......@@ -51,16 +49,7 @@ def _parse_args(message_def,
"""build option with args/kwargs
"""
new_options = OrderedDict()
#for idx, arg in enumerate(message_def.args):
# name = 'tiramisu_' + str(idx)
# if not arg.required:
# raise Exception('arg without required ?? in {}'.format(file_path))
# new_options[name] = arg
# if arg.needs:
# needs.setdefault(message_def.uri, {}).setdefault(arg.needs, []).append(name)
for name, arg in message_def.parameters.items():
#if name.startswith('tiramisu_'):
# raise Exception('multi args with name {} in {}'.format(name, file_path))
new_options[name] = arg
if arg.ref:
needs.setdefault(message_def.uri, {}).setdefault(arg.ref, []).append(name)
......@@ -85,69 +74,18 @@ def _parse_responses(message_def,
param_type = param_type[2:]
if param_type in ['Dict', 'File']:
pass
#break
if message_def.response.parameters is not None:
for name, obj in message_def.response.parameters.items():
if name in responses:
raise Exception('multi response with name {} in {}'.format(name, file_path))
#param_type = obj.type
descr = obj.description.strip().rstrip()
#if message_def.parameters:
# for custom_name, custom_param in message_def.parameters.items():
# param_type2 = custom_param.type
# #if param_type2 in message_def.customtype:
# # keys[custom_name] = {'description': custom_descr,
# # 'columns': {}}
# # customtype2 = message_def.customtype[param_type2]
# # for custom_name2, custom_param2 in customtype2['parameters'].items():
# # keys[custom_name]['columns'][custom_name2] = {'description': custom_param2['description'].strip().rstrip(),
# # 'type': param_type2}
# # ref = custom_param2.get('ref')
# # if ref:
# # provides[custom_name2] = ref
# #else:
# keys['']['columns'][custom_name] = {'description': custom_param.description,
# 'type': param_type2}
# ref = custom_param.ref
# if ref:
# provides[custom_name] = ref
#else:
keys['']['columns'][name] = {'description': obj.description,
'type': obj.type}
ref = obj.ref
if ref:
provides[name] = ref
#if param_type in message_def.customtype:
# customtype = message_def.customtype[param_type]
# key = name
# if customtype['type'] == 'Dict':
# for custom_name, custom_param in customtype['parameters'].items():
# param_type2 = custom_param['type']
# #if param_type2.startswith('[]'):
# # break
# #if param_type2 in ['Dict', 'File']:
# # break
# custom_descr = custom_param['description'].strip().rstrip()
# if param_type2 in message_def.customtype:
# keys[custom_name] = {'description': custom_descr,
# 'columns': {}}
# customtype2 = message_def.customtype[param_type2]
# for custom_name2, custom_param2 in customtype2['parameters'].items():
# keys[custom_name]['columns'][custom_name2] = {'description': custom_param2['description'].strip().rstrip(),
# 'type': param_type2}
# ref = custom_param2.get('ref')
# if ref:
# provides[custom_name2] = ref
# else:
# keys['']['columns'][custom_name] = {'description': custom_descr,
# 'type': param_type}
# ref = custom_param.get('ref')
# if ref:
# provides[custom_name] = ref
# else:
# continue
# break
# break
else:
keys['']['columns'][name] = {'description': descr,
'type': obj.type}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment