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

schemasalad:null being detected as items in an array

Offen
#171 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
help wanted
Vorherrschende Sprache
Java
Sterne
52
Forks
29
Ø Merge
5 Std. 12 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.