Parameter sets value
only supports string
type
#3331
Labels
suggestion
Idea for maintainers to consider. Do not take this issue until triaged.
Is your feature request related to a problem? Please describe.
If a bundle takes a parameter that is not a string type, e.g.
object
orinteger
, that is the type that should be possible to enter in the parameter set definition. Currently, the value gets blanked out if the type is anything else than a string.That being said, if the value is "converted" to a string, e.g. creating a string json representation, then it still works as a parameter since Porter will convert it when setting the parameter on the bundle. This is not very intuitive though, especially when dealing with numbers, which are likely to get entered verbatim (without quotes) and thus will get blanked out.
Describe the solution you'd like
Support any type supported by Porter parameters in the
value
property of a parameter in parameter sets, for example:In the example above, the object set to
value
is an object with a propertysome-prop
.Currently, the workaround to this is setting the value like this:
Describe alternatives you've considered
I think the implementation could be as simple as converting the
value
objects to strings in the code, which would not require a lot of refactoring since the string type would be type same in the rest of the code.A better, but more involved way, might be to actually treat the
value
as any type in all related parts of the code.The text was updated successfully, but these errors were encountered: