common-workflow-language / common-workflow-language/cwlviewer
schemasalad:null being detected as items in an array
- Dominant language
- Java
- Stars
- 52
- Forks
- 29
- Avg merge
- 5h 12m
- Merged PRs (30d)
- 6
Description
When the following syntax is used to denote the types of items in an array:
```yaml
type:
items:
- 'null'
- string
type: array
```
The type is detected as: `https://w3id.org/cwl/salad#null[]`
`array` is listed as being supported by the spec which implies that we should be parsing more than one type when we currently do not.
It is unclear to the author as to the implication of null being within this array (makes the whole array optional as a consequence due to the possibility of an array of nothing?). [Asked for clarification here](https://gitter.im/common-workflow-language/common-workflow-language?at=59a03fe0210ac26920bef322).
Example: http://view.commonwl.org/workflows/github.com/bcbio/bcbio_validation_workflows/blob/master/NA12878-chr20/NA12878-platinum-chr20-workflow/main-NA12878-platinum-chr20.cwl
[Branch here](https://github.com/common-workflow-language/cwlviewer/tree/sldnull-types) contains a naive approach blocking null from appearing as the type of arrays (in this case displaying the above example as just `String[]`) however this is not an ideal fix.
Contributor guide
Assessment
This issue has not been assessed yet.