schema_salad
schema_salad copied to clipboard
Add a possibility to specify default values for fields in schema salad
It would be interesting to be able to specify a default value for fields in schema_salad based specs. Currently they are mentioned in the documentation field, but this is not really machine readable (e.g. https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/CommandLineTool.yml#L172). Having these would help a lot to generate SDKs ;) cc @anton-khodak @khillion
- Add "default" field to Salad metaschema
- Add support to Python codegen to set value of "default" on fields which are not loaded from document
- Update CWL spec with machine-readable defaults
2020-12-02 update:
-
default
was added to the schema-salad v1.1 spec: https://www.commonwl.org/v1.1/SchemaSalad.html#Introduction_to_v1.1 - No updates have been made to the Python codegen yet about defaults (nor the Java codegen)
- There are many defaults set in CWL v1.2, here's PR to add 4 more: https://github.com/common-workflow-language/cwl-v1.2/pull/68