How to use the cwlts/schemas.schemas function in cwlts

To help you get started, we’ve selected a few cwlts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rabix / composer / src / app / editor-common / cwl-schema-validation-worker / cwl-schema-validation-worker.service.ts View on Github external
isValidatableCWL: boolean;
    isValidCWL: boolean;
    isValidJSON: boolean;
    errors: Issue[];
    warnings: Issue[];
    class?: string | "CommandLineTool" | "Workflow" | "ExpressionTool";
}

@Injectable()
export class CwlSchemaValidationWorkerService {

    private worker: WebWorker;

    private draft4;

    private cwlSchema = cwlSchemas.schemas.mixed;


    constructor(private workerBuilder: WebWorkerBuilderService) {

        this.worker = this.workerBuilder.create(this.workerFunction, [
            "ajv.min.js",
            "js-yaml.min.js"
        ], {
            cwlSchema: this.cwlSchema,
            // FIXME: will not work in browser, window.require call
            draft4: {
                "id": "http://json-schema.org/draft-04/schema#",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "description": "Core schema meta-schema",
                "definitions": {
                    "schemaArray": {