CWL to JSON Schema Converter
This library provides an easy way to convert the input definition of a Common Workflow Language file to a JSON Schema
The primary goal of this library is to facilitate the use of schema-form.
CWL:
The following is an example CWL CommandLineDefinition.
cwlVersion: v1.0 class: CommandLineTool inputs: birth_rate: type: type: record fields: - id: mean type: double - id: median type: double outputs: [] baseCommand: echo
Conversion code:
The following (very abbreviated) example typescript code is what is used to display the page in the demo
import { JSONSchema6, CwlToJsonSchemaConverter } from '../lib/cwl-to-jsonschema.converter';
CwlToJsonSchemaConverter.convert('Demo Yaml', <yaml string>);
Schema:
This results in the follow json schema:
Credits
This package was created using the typescript-library-starter.