# JSON-Schemas for validating your CWL Code and CWL Code inputs

**URL:** <https://cwl.discourse.group/t/json-schemas-for-validating-your-cwl-code-and-cwl-code-inputs/896>\
**Category:** CWLCon 2024\
**Created:** [May 5, 2024, 11:38pm UTC](https://cwl.discourse.group/t/json-schemas-for-validating-your-cwl-code-and-cwl-code-inputs/896 "2024-05-05T23:38:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexiswl](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/alexiswl/32/93_2.png) [@alexiswl](https://cwl.discourse.group/u/alexiswl)\
**Post date:** [May 5, 2024, 11:38pm UTC](https://cwl.discourse.group/t/json-schemas-for-validating-your-cwl-code-and-cwl-code-inputs/896/1 "2024-05-05T23:38:46Z")

</div>

**Presenter:** [Alexis Lucattini](https://github.com/alexiswl), University of Melbourne

**Schedule:**

[ Session 2 (Online only)  
Thursday 9 May / Friday 10 May  
APAC-Americas Friendly time](https://www.commonwl.org/conferences/2024/#onlinesession2)

[Session 3 (Amsterdam / Online hybrid)  
Wednesday 15 May  
APAC-EMEA Friendly time](https://www.commonwl.org/conferences/2024/#session3)

> How do you know if your inputs for a CWL workflow are valid without just running the workflow?  
> If you have access to your workflow, ‘cwltool –validate workflow.cwl input.json’ might be enough, what if you do not have easy access to the underlying workflow object?  
> What if you are submitting your input json to an API endpoint to run an analysis?  
> What if your workflow engine doesn’t validate your inputs before downloading terabytes of inputs? Only to fail hours later ☹  
> This could have been prevented if there was a JSON schema for the CWL workflow.  
> In this talk, we explore the benefits and challenges of JSON schemas, how we’re using JSON schemas for CWL workflows at UMCCR.  
> We also explore JSON Schema as a benefit for developers of CWL Workflows, since workflows themselves can be represented as JSON objects with their own requirements.

**Please leave your questions for the presenter below!**

[![](https://global.discourse-cdn.com/free1/uploads/cwl1/original/1X/17b9b8766dd027556d54be2e1d440c9305dc3456.jpeg "JSON Schemas for validating CWL and CWL Inputs") ](https://www.youtube.com/watch?v=FocthtVBvKI)

As an alternative to YouTube, this presentations is also available on ConfTube

https://conf.tube/videos/embed/1ae180ab-a5c9-4e3b-aef8-7841f35253fc

---

<div class="post-metadata">

**Author:** ![alexiswl](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/alexiswl/32/93_2.png) [@alexiswl](https://cwl.discourse.group/u/alexiswl)\
**Post date:** [May 9, 2024, 11:22pm UTC](https://cwl.discourse.group/t/json-schemas-for-validating-your-cwl-code-and-cwl-code-inputs/896/2 "2024-05-09T23:22:02Z")

</div>

To generate a json schema for your cwl workflow - checkout this PR for [cwl-utils](https://github.com/common-workflow-language/cwl-utils/pull/288)

---

<div class="post-metadata">

**Author:** ![alexiswl](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/alexiswl/32/93_2.png) [@alexiswl](https://cwl.discourse.group/u/alexiswl)\
**Post date:** [May 9, 2024, 11:25pm UTC](https://cwl.discourse.group/t/json-schemas-for-validating-your-cwl-code-and-cwl-code-inputs/896/3 "2024-05-09T23:25:47Z")

</div>

Setting up instructions JSON Schema CWL for your IDE can be seen here - [CWL Schema is now available on JSON Schema Store - Announcements - Common Workflow Language Discourse](https://cwl.discourse.group/t/cwl-schema-is-now-available-on-json-schema-store/872)
