Hi all,
Excited to announce that the CWL JSON Schema is now available on the JSON Schema store!!
This means that any interaction with CWL on an IDE that supports JSON Schemas will syntax highlight your code and hopefully both autocomplete and error highlight any CWL code you may have.
3 Likes
VSCode Setup:
- Install the RedHat Yaml extension.
- Associate .cwl file types with .yaml
This can be achieved by opening up user settings.json
and adding the following code:
{
"files.associations": {
"*.cwl": "yaml"
}
}
settings.json
can be opened via the command pallete (Ctrl + Shift + P) and entering Preferences: Open User Settings (JSON)
JetBrains Setup
Make sure your .cwl files are associated as yaml files by going
Settings (Ctrl + Alt +S ) → Editor → File Types → YAML
Add *.cwl
to the list of file name patterns
Example - Highlight Invalid Keys
Invalid key in input item (VSCode)

Invalid top level document key (VSCode)

Invalid key in argument item (JetBrains)

Invalid requirements key (JetBrains)

Invlid top level key (JetBrains)

Example - Hightlight Documentation
Show inputBinding documentation (VSCode)

Show valueFrom documentation (JetBrains)

Show requirements documentation (JetBrains)

Provide Valid Suggestions
Provide valid suggestion to input item (VSCode)

Provide valid suggestion to requirements (VSCode)

Provide valid suggestion to input (JetBrains)

Provide valid suggestion to requirements (JetBrains)

Note: Enabling VSCode extensions such as vscode-cwl or CWL (Rabix/Benten) may cause the JSON Schema highlighting not to work