Commit a6eaa509 authored by Matthieu Lamalle's avatar Matthieu Lamalle

Revert "Modify API v1 message arg to be positional"

This reverts commit 004dfb93
parent ee6322f2
......@@ -3,7 +3,7 @@ from collections import OrderedDict
from os.path import join, basename, dirname
from glob import glob
from tiramisu import StrOption, IntOption, BoolOption, ChoiceOption, OptionDescription, Config, SymLinkOption
from tiramisu import StrOption, IntOption, BoolOption, ChoiceOption, OptionDescription, Config
ALLOW_PRIVATE = False
ROOTPATH = join('..')
......@@ -54,10 +54,7 @@ def _parse_args(message_def,
if arg.ref:
needs.setdefault(message_def.uri, {}).setdefault(arg.ref, []).append(name)
for name, arg in new_options.items():
current_opt = _get_option(name, arg, file_path)
options.append(current_opt)
if arg.shortarg:
options.append(SymLinkOption(arg.shortarg, current_opt))
options.append(_get_option(name, arg, file_path))
def _parse_responses(message_def,
......@@ -77,12 +74,12 @@ def _parse_responses(message_def,
param_type = param_type[2:]
if param_type in ['Dict', 'File']:
pass
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))
descr = obj.description.strip().rstrip()
keys['']['columns'][name] = {'description': obj.description,
'type': obj.type}
......@@ -142,7 +139,7 @@ def _get_root_option(optiondescriptions):
options_obj = [ChoiceOption('message',
'Sélectionner le message.',
tuple(messages),
properties=frozenset(['mandatory', 'positional']))]
properties=frozenset(['mandatory']))]
for name, options_descr in optiondescriptions.items():
description, options = options_descr
if len(options) != 1:
......
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