wdl
wdl copied to clipboard
Clarify whether extra keys are allowed when coercing `Map` to `Struct`
I have noticed that when coercing JSON data to a struct (as in MyStruct x = read_json("data.json")
) miniwdl will give me an error if the JSON object contains contains properties/keys not in the struct, while Cromwell doesn't. I haven't found anything in the spec which explicitly states whether this should be allowed. In my opinion it makes a lot of sense to be permissive in this regard.
Draft implementation: https://github.com/openwdl/wdl/tree/482-extra-keys
I agree that permissive makes a lot of sense and it should indeed be made explicit. Workflow engines should be able to configure a change to this setting.
+1
I added this to the roadmap
+1 as well. This feels overly strict at the moment to not allow extra keys in an JSON document. Its a bit onerous to have to create a 1:1 representation with any JSON document in order to use it in a wdl