summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-10-27 11:26:44 -0400
committerNicoleYarroch <nicole@livio.io>2020-10-27 11:26:44 -0400
commitafa78533c7d044fb7997e913ac5b16d392a9eb1d (patch)
tree7f6ae834537ad841e77e2554595702a1988b1ded
parent359f1b4eee404ce7a0f393c75fe1498ec728d5bd (diff)
downloadsdl_ios-afa78533c7d044fb7997e913ac5b16d392a9eb1d.tar.gz
Renamed function name
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r--generator/transformers/common_producer.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/generator/transformers/common_producer.py b/generator/transformers/common_producer.py
index 63a7134bb..376df7e27 100644
--- a/generator/transformers/common_producer.py
+++ b/generator/transformers/common_producer.py
@@ -366,13 +366,20 @@ class InterfaceProducerCommon(ABC):
'modifier': 'strong',
'history' : param.history }
if isinstance(param.param_type, (Integer, Float, String, Array)):
- data['description'].append(self.create_param_descriptor(param.param_type, OrderedDict()))
+ data['description'].append(self.create_param_type_descriptor(param.param_type, OrderedDict()))
+
+ if isinstance(param.param_type, (Enum)) and param.default_value:
+ print('\nEnum default value whoo ' + param.default_value.name)
+ for key, value in param.__dict__.items():
+ print('key ' + key + ', value ' + str(value))
+ for key, value in param.param_type.__dict__.items():
+ print('\tparam_type key ' + key + ', value ' + str(value))
data.update(self.extract_type(param))
data.update(self.param_origin_change(param.name))
return self.param_named(**data)
- def create_param_descriptor(self, param_type, parameterItems):
+ def create_param_type_descriptor(self, param_type, parameterItems):
"""
Recursively creates a documentation string of all the descriptors for a parameter (e.g. {"string_min_length": 1, string_max_length": 500}). The parameters should be returned in the same order they were added to the parameterItems dictionary
:param param_type: param_type from the initial Model
@@ -387,7 +394,7 @@ class InterfaceProducerCommon(ABC):
# Skip adding documentation for the data type if it is a struct or enum. This is unnecessary as each enum or struct has its own documentation
continue
else:
- self.create_param_descriptor(value, parameterItems)
+ self.create_param_type_descriptor(value, parameterItems)
else:
if key == 'default_value' and value is None:
# Do not add the default_value key/value pair unless it has been explicitly set in the RPC Spec