common-workflow-language / common-workflow-language/cwlviewer

schemasalad:null being detected as items in an array

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
help wanted
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.