When signing views some unintuitive things can happen to the parameters stored in the metadata of the view.
First, if a parameter was not defined for the app you get a warning but the parameter is still stored in the metadata (these both make sense). But if the parameter is multi-valued then only the first value will be stored in the metadata.
This is easy to change by fiddling with the two instances of this code in the sign_view() method:
if k in params_map and params_map[k].multivalued:
view.metadata.add_parameter(k, str(v))
else:
view.metadata.add_parameter(k, v[0])
Second, if parameters were handed in via an envelope then it is maybe better to not make the values always a string. That made sense for parameters handed in via command line options and GET variables, less so for values that initially came from a JSON file that used dictionaries and lists as it pleased.
When signing views some unintuitive things can happen to the parameters stored in the metadata of the view.
First, if a parameter was not defined for the app you get a warning but the parameter is still stored in the metadata (these both make sense). But if the parameter is multi-valued then only the first value will be stored in the metadata.
This is easy to change by fiddling with the two instances of this code in the sign_view() method:
Second, if parameters were handed in via an envelope then it is maybe better to not make the values always a string. That made sense for parameters handed in via command line options and GET variables, less so for values that initially came from a JSON file that used dictionaries and lists as it pleased.