From 6a5f470730ccd73da2b743705e762d233879a306 Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Sat, 19 Nov 2022 14:30:12 +0000 Subject: [PATCH] Fix `@link` annotated fields See: https://github.com/common-workflow-language/schema_salad/pull/632 --- source/cwl_d_auto/v1_0.d | 220 ++++----------------------------------- source/cwl_d_auto/v1_1.d | 56 +++++----- source/cwl_d_auto/v1_2.d | 68 ++++++------ 3 files changed, 84 insertions(+), 260 deletions(-) diff --git a/source/cwl_d_auto/v1_0.d b/source/cwl_d_auto/v1_0.d index 090cca7..495c5ee 100644 --- a/source/cwl_d_auto/v1_0.d +++ b/source/cwl_d_auto/v1_0.d @@ -19,7 +19,6 @@ enum parserInfo = "CWL v1.0 parser generated with schema-salad-tool"; * Salad data types are based on Avro schema declarations. Refer to the * [Avro schema declaration documentation](https://avro.apache.org/docs/current/spec.html#schemas) for * detailed information. - * * null: no value * boolean: a binary value * int: 32-bit signed integer @@ -30,16 +29,15 @@ enum parserInfo = "CWL v1.0 parser generated with schema-salad-tool"; */ class PrimitiveType : SchemaBase { - /// enum Symbol { - s0 = "null", /// - s1 = "boolean", /// - s2 = "int", /// - s3 = "long", /// - s4 = "float", /// - s5 = "double", /// - s6 = "string" /// + s0 = "null", + s1 = "boolean", + s2 = "int", + s3 = "long", + s4 = "float", + s5 = "double", + s6 = "string" } Symbol value; @@ -100,7 +98,7 @@ class EnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -187,10 +185,8 @@ class CWLType : SchemaBase * Represents a file (or group of files when `secondaryFiles` is provided) that * will be accessible by tools using standard POSIX file system call API such as * open(2) and read(2). - * * Files are represented as objects with `class` of `File`. File objects have * a number of properties that provide metadata about the file. - * * The `location` property of a File is a URI that uniquely identifies the * file. Implementations must support the file:// URI scheme and may support * other schemes such as http://. The value of `location` may also be a @@ -200,23 +196,19 @@ class CWLType : SchemaBase * path available on the same host as the CWL runner (for inputs) or the * runtime environment of a command line tool execution (for command line tool * outputs). - * * If no `location` or `path` is specified, a file object must specify * `contents` with the UTF-8 text content of the file. This is a "file * literal". File literals do not correspond to external resources, but are * created on disk with `contents` with when needed for a executing a tool. * Where appropriate, expressions can return file literals to define new files * on a runtime. The maximum size of `contents` is 64 kilobytes. - * * The `basename` property defines the filename on disk where the file is * staged. This may differ from the resource name. If not provided, * `basename` must be computed from the last path part of `location` and made * available to expressions. - * * The `secondaryFiles` property is a list of File or Directory objects that * must be staged in the same directory as the primary file. It is an error * for file names to be duplicated in `secondaryFiles`. - * * The `size` property is the size in bytes of the File. It must be computed * from the resource and made available to expressions. The `checksum` field * contains a cryptographic hash of the file content for use it verifying file @@ -224,30 +216,25 @@ class CWLType : SchemaBase * computation of the `checksum` field for performance or other reasons. * However, the ability to compute output checksums is required to pass the * CWL conformance test suite. - * * When executing a CommandLineTool, the files and secondary files may be * staged to an arbitrary directory, but must use the value of `basename` for * the filename. The `path` property must be file path in the context of the * tool execution runtime (local to the compute node, or within the executing * container). All computed properties should be available to expressions. * File literals also must be staged and `path` must be set. - * * When collecting CommandLineTool outputs, `glob` matching returns file paths * (with the `path` property) and the derived properties. This can all be * modified by `outputEval`. Alternately, if the file `cwl.output.json` is * present in the output, `outputBinding` is ignored. - * * File objects in the output must provide either a `location` URI or a `path` * property in the context of the tool execution runtime (local to the compute * node, or within the executing container). - * * When evaluating an ExpressionTool, file objects must be referenced via * `location` (the expression tool does not have access to files on disk so * `path` is meaningless) or as file literals. It is legal to return a file * object with an existing `location` but a different `basename`. The * `loadContents` field of ExpressionTool inputs behaves the same as on * CommandLineTool inputs, however it is not meaningful on the outputs. - * * An ExpressionTool may forward file references from input to output by using * the same value for `location`. */ @@ -265,11 +252,9 @@ class File : SchemaBase * implementation is unable to retrieve the file content stored at a * remote resource (due to unsupported protocol, access denied, or other * issue) it must signal an error. - * * If the `location` field is not provided, the `contents` field must be * provided. The implementation must assign a unique identifier for * the `location` field. - * * If the `path` field is provided but the `location` field is not, an * implementation may assign the value of the `path` field to `location`, * then follow the rules above. @@ -282,13 +267,11 @@ class File : SchemaBase * must not be used in any other context. The command line tool being * executed must be able to to access the file at `path` using the POSIX * `open(2)` syscall. - * * As a special case, if the `path` field is provided but the `location` * field is not, an implementation may assign the value of the `path` * field to `location`, and remove the `path` field. - * * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) - * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`, + * (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`, * ``, ``, and ``) or characters * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) @@ -299,12 +282,10 @@ class File : SchemaBase /** * The base name of the file, that is, the name of the file without any * leading directory path. The base name must not contain a slash `/`. - * * If not provided, the implementation must set this field based on the * `location` field by taking the final path component after parsing * `location` as an IRI. If `basename` is provided, it is not required to * match the value from `location`. - * * When this file is made available to a CommandLineTool, it must be named * with `basename`, i.e. the final component of the `path` field must match * `basename`. @@ -314,7 +295,6 @@ class File : SchemaBase * The name of the directory containing file, that is, the path leading up * to the final slash in the path such that `dirname + '/' + basename == * path`. - * * The implementation must set this field based on the value of `path` * prior to evaluating parameter references or expressions in a * CommandLineTool document. This field must not be used in any other @@ -327,7 +307,6 @@ class File : SchemaBase * period. For the purposess of path splitting leading periods on the * basename are ignored; a basename of `.cshrc` will have a nameroot of * `.cshrc`. - * * The implementation must set this field automatically based on the value * of `basename` prior to evaluating parameter references or expressions. */ @@ -337,7 +316,6 @@ class File : SchemaBase * `nameext` is empty or begins with a period and contains at most one * period. Leading periods on the basename are ignored; a basename of * `.cshrc` will have an empty `nameext`. - * * The implementation must set this field automatically based on the value * of `basename` prior to evaluating parameter references or expressions. */ @@ -364,27 +342,23 @@ class File : SchemaBase * The format of the file: this must be an IRI of a concept node that * represents the file format, preferrably defined within an ontology. * If no ontology is available, file formats may be tested by exact match. - * * Reasoning about format compatability must be done by checking that an * input file format is the same, `owl:equivalentClass` or * `rdfs:subClassOf` the format required by the input parameter. * `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if * ` owl:equivalentClass ` and ` owl:subclassOf ` then infer * ` owl:subclassOf `. - * * File format ontologies may be provided in the "$schemas" metadata at the * root of the document. If no ontologies are specified in `$schemas`, the * runtime may perform exact file format matches. */ - @link Either!(None, string) format_; + Either!(None, string) format_; /** * File contents literal. Maximum of 64 KiB. - * * If neither `location` nor `path` is provided, `contents` must be * non-null. The implementation must assign a unique identifier for the * `location` field. When the file is staged as input to CommandLineTool, * the value of `contents` must be written to a file. - * * If `loadContents` of `inputBinding` or `outputBinding` is true and * `location` is valid, the implementation must read up to the first 64 * KiB of text from the file and place it in the "contents" field. @@ -398,10 +372,8 @@ class File : SchemaBase /** * Represents a directory to present to a command line tool. - * * Directories are represented as objects with `class` of `Directory`. Directory objects have * a number of properties that provide metadata about the directory. - * * The `location` property of a Directory is a URI that uniquely identifies * the directory. Implementations must support the file:// URI scheme and may * support other schemes such as http://. Alternately to `location`, @@ -409,35 +381,28 @@ class File : SchemaBase * must be a filesystem path available on the same host as the CWL runner (for * inputs) or the runtime environment of a command line tool execution (for * command line tool outputs). - * * A Directory object may have a `listing` field. This is a list of File and * Directory objects that are contained in the Directory. For each entry in * `listing`, the `basename` property defines the name of the File or * Subdirectory when staged to disk. If `listing` is not provided, the * implementation must have some way of fetching the Directory listing at * runtime based on the `location` field. - * * If a Directory does not have `location`, it is a Directory literal. A * Directory literal must provide `listing`. Directory literals must be * created on disk at runtime as needed. - * * The resources in a Directory literal do not need to have any implied * relationship in their `location`. For example, a Directory listing may * contain two files located on different hosts. It is the responsibility of * the runtime to ensure that those files are staged to disk appropriately. * Secondary files associated with files in `listing` must also be staged to * the same Directory. - * * When executing a CommandLineTool, Directories must be recursively staged * first and have local values of `path` assigend. - * * Directory objects in CommandLineTool output must provide either a * `location` URI or a `path` property in the context of the tool execution * runtime (local to the compute node, or within the executing container). - * * An ExpressionTool may forward file references from input to output by using * the same value for `location`. - * * Name conflicts (the same `basename` appearing multiple times in `listing` * or in any entry in `secondaryFiles` in the listing) is a fatal error. */ @@ -456,11 +421,9 @@ class Directory : SchemaBase * unable to retrieve the directory listing stored at a remote resource (due to * unsupported protocol, access denied, or other issue) it must signal an * error. - * * If the `location` field is not provided, the `listing` field must be * provided. The implementation must assign a unique identifier for * the `location` field. - * * If the `path` field is provided but the `location` field is not, an * implementation may assign the value of the `path` field to `location`, * then follow the rules above. @@ -472,9 +435,8 @@ class Directory : SchemaBase * must not be used in any other context. The command line tool being * executed must be able to to access the directory at `path` using the POSIX * `opendir(2)` syscall. - * * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) - * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`, + * (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`, * ``, ``, and ``) or characters * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) @@ -485,12 +447,10 @@ class Directory : SchemaBase /** * The base name of the directory, that is, the name of the file without any * leading directory path. The base name must not contain a slash `/`. - * * If not provided, the implementation must set this field based on the * `location` field by taking the final path component after parsing * `location` as an IRI. If `basename` is provided, it is not required to * match the value from `location`. - * * When this file is made available to a CommandLineTool, it must be named * with `basename`, i.e. the final component of the `path` field must match * `basename`. @@ -571,7 +531,7 @@ class InputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -663,7 +623,7 @@ class OutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -712,12 +672,10 @@ class InputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -727,16 +685,13 @@ class InputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -746,7 +701,6 @@ class InputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -763,13 +717,12 @@ class InputParameter : SchemaBase @id string id_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This must be one or more IRIs of concept nodes * that represents file formats which are allowed as input to this * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Describes how to handle the inputs of a process and convert them * into a concrete form for execution, such as command line parameters. @@ -801,12 +754,10 @@ class OutputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -816,16 +767,13 @@ class OutputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -835,7 +783,6 @@ class OutputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -856,11 +803,10 @@ class OutputParameter : SchemaBase Either!(None, CommandOutputBinding) outputBinding_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This is the file format that will be assigned to * the output parameter. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; mixin genCtor; mixin genIdentifier; @@ -937,47 +883,36 @@ class EnvironmentDef : SchemaBase } /** - * * When listed under `inputBinding` in the input schema, the term * "value" refers to the the corresponding value in the input object. For * binding objects listed in `CommandLineTool.arguments`, the term "value" * refers to the effective value after evaluating `valueFrom`. - * * The binding behavior when building the command line depends on the data * type of the value. If there is a mismatch between the type described by * the input schema and the effective value, such as resulting from an * expression evaluation, an implementation must use the data type of the * effective value. - * * - **string**: Add `prefix` and the string to the command line. - * * - **number**: Add `prefix` and decimal representation to command line. - * * - **boolean**: If true, add `prefix` to the command line. If false, add * nothing. - * * - **File**: Add `prefix` and the value of * [`File.path`](#File) to the command line. - * * - **Directory**: Add `prefix` and the value of * [`Directory.path`](#Directory) to the command line. - * * - **array**: If `itemSeparator` is specified, add `prefix` and the join * the array into a single string with `itemSeparator` separating the * items. Otherwise first add `prefix`, then recursively process * individual elements. * If the array is empty, it does not add anything to command line. - * * - **object**: Add `prefix` only, and recursively add object fields for * which `inputBinding` is specified. - * * - **null**: Add nothing. */ class CommandLineBinding : SchemaBase { /** * Only valid when `type: File` or is an array of `items: File`. - * * Read up to the first 64 KiB of text from the file and place it in the * "contents" field of the file object for use by expressions. */ @@ -1004,7 +939,6 @@ class CommandLineBinding : SchemaBase /** * If `valueFrom` is a constant string value, use this as the value and * apply the binding rules above. - * * If `valueFrom` is an expression, evaluate the expression to yield the * actual value to use to build the command line and apply the binding * rules above. If the inputBinding is associated with an input @@ -1012,7 +946,6 @@ class CommandLineBinding : SchemaBase * the input parameter. Input parameter defaults (as specified by the * `InputParameter.default` field) must be applied before evaluating the * expression. - * * When a binding is part of the `CommandLineTool.arguments` field, * the `valueFrom` field is required. */ @@ -1021,7 +954,6 @@ class CommandLineBinding : SchemaBase * If `ShellCommandRequirement` is in the requirements for the current command, * this controls whether the value is quoted on the command line (default is true). * Use `shellQuote: false` to inject metacharacters for operations such as pipes. - * * If `shellQuote` is true or not provided, the implementation must not * permit interpretation of any shell metacharacters or directives. */ @@ -1035,10 +967,8 @@ class CommandLineBinding : SchemaBase /** * Describes how to generate an output parameter based on the files produced * by a CommandLineTool. - * * The output parameter value is generated by applying these operations in the * following order: - * * - glob * - loadContents * - outputEval @@ -1133,7 +1063,7 @@ class CommandInputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1227,7 +1157,7 @@ class CommandOutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1278,12 +1208,10 @@ class CommandInputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -1293,16 +1221,13 @@ class CommandInputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -1312,7 +1237,6 @@ class CommandInputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -1329,13 +1253,12 @@ class CommandInputParameter : SchemaBase @id string id_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This must be one or more IRIs of concept nodes * that represents file formats which are allowed as input to this * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Describes how to handle the inputs of a process and convert them * into a concrete form for execution, such as command line parameters. @@ -1369,12 +1292,10 @@ class CommandOutputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -1384,16 +1305,13 @@ class CommandOutputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -1403,7 +1321,6 @@ class CommandOutputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -1424,11 +1341,10 @@ class CommandOutputParameter : SchemaBase Either!(None, CommandOutputBinding) outputBinding_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This is the file format that will be assigned to * the output parameter. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -1442,13 +1358,11 @@ class CommandOutputParameter : SchemaBase /** * Only valid as a `type` for a `CommandLineTool` output with no * `outputBinding` set. - * * The following * ``` * outputs: * an_output_name: * type: stdout - * * stdout: a_stdout_file * ``` * is equivalent to @@ -1459,10 +1373,8 @@ class CommandOutputParameter : SchemaBase * streamable: true * outputBinding: * glob: a_stdout_file - * * stdout: a_stdout_file * ``` - * * If there is no `stdout` name provided, a random filename will be created. * For example, the following * ``` @@ -1478,7 +1390,6 @@ class CommandOutputParameter : SchemaBase * streamable: true * outputBinding: * glob: random_stdout_filenameABCDEFG - * * stdout: random_stdout_filenameABCDEFG * ``` */ @@ -1499,13 +1410,11 @@ class stdout : SchemaBase /** * Only valid as a `type` for a `CommandLineTool` output with no * `outputBinding` set. - * * The following * ``` * outputs: * an_output_name: * type: stderr - * * stderr: a_stderr_file * ``` * is equivalent to @@ -1516,10 +1425,8 @@ class stdout : SchemaBase * streamable: true * outputBinding: * glob: a_stderr_file - * * stderr: a_stderr_file * ``` - * * If there is no `stderr` name provided, a random filename will be created. * For example, the following * ``` @@ -1535,7 +1442,6 @@ class stdout : SchemaBase * streamable: true * outputBinding: * glob: random_stderr_filenameABCDEFG - * * stderr: random_stderr_filenameABCDEFG * ``` */ @@ -1568,7 +1474,6 @@ class stderr : SchemaBase * values. Input parameters include a schema for each parameter which is * used to validate the input object. It may also be used to build a user * interface for constructing the input object. - * * When accepting an input object, all input parameters must have a value. * If an input parameter is missing from the input object, it must be * assigned a value of `null` (or the value of `default` for that @@ -1618,11 +1523,9 @@ class stderr : SchemaBase * mandatory command line arguments. The elements in `baseCommand` must * appear before any command line bindings from `inputBinding` or * `arguments`. - * * If `baseCommand` is not provided or is an empty array, the first * element of the command line produced after processing `inputBinding` or * `arguments` must be used as the program to execute. - * * If the program includes a path separator character it must * be an absolute path, otherwise it is an error. If the program does not * include a path separator, search the `$PATH` variable in the runtime @@ -1642,9 +1545,7 @@ class stderr : SchemaBase /** * Capture the command's standard error stream to a file written to * the designated output directory. - * * If `stderr` is a string, it specifies the file name to use. - * * If `stderr` is an expression, the expression is evaluated and must * return a string with the file name to use to capture stderr. If the * return value is not a string, or the resulting path contains illegal @@ -1654,9 +1555,7 @@ class stderr : SchemaBase /** * Capture the command's standard output stream to a file written to * the designated output directory. - * * If `stdout` is a string, it specifies the file name to use. - * * If `stdout` is an expression, the expression is evaluated and must * return a string with the file name to use to capture stdout. If the * return value is not a string, or the resulting path contains illegal @@ -1687,32 +1586,25 @@ class stderr : SchemaBase * Indicates that a workflow component should be run in a * [Docker](http://docker.com) container, and specifies how to fetch or build * the image. - * * If a CommandLineTool lists `DockerRequirement` under * `hints` (or `requirements`), it may (or must) be run in the specified Docker * container. - * * The platform must first acquire or install the correct Docker image as * specified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`. - * * The platform must execute the tool in the container using `docker run` with * the appropriate Docker image and tool command line. - * * The workflow platform may provide input files and the designated output * directory through the use of volume bind mounts. The platform should rewrite * file paths in the input object to correspond to the Docker bind mounted * locations. That is, the platform should rewrite values in the parameter context * such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths * within the container. - * * When running a tool contained in Docker, the workflow platform must not * assume anything about the contents of the Docker container, such as the * presence or absence of specific software, except to assume that the * generated command line represents a valid command within the runtime * environment of the container. - * * ## Interaction with other requirements - * * If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a * DockerRequirement, the environment variables must be provided to Docker * using `--env` or `--env-file` and interact with the container's preexisting @@ -1798,12 +1690,10 @@ class SoftwarePackage : SchemaBase * the `package` field. Implementations may provide resolvers which map * these software identifer IRIs to some configuration action; or they can * use only the name from the `package` field on a best effort basis. - * * For example, the IRI https://packages.debian.org/bowtie could * be resolved with `apt-get install bowtie`. The IRI * https://anaconda.org/bioconda/bowtie could be resolved with `conda * install -c bioconda bowtie`. - * * IRIs can also be system independent and used to map to a specific * software installation or selection mechanism. * Using [RRID](https://www.identifiers.org/rrid/) as an example: @@ -1818,7 +1708,6 @@ class SoftwarePackage : SchemaBase * If supported by a given registry, implementations are encouraged to * query these system independent sofware identifier IRIs directly for * links to packaging systems. - * * A site specific IRI can be listed as well. For example, an academic * computing cluster using Environement Modules could list the IRI * `https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that @@ -1828,7 +1717,6 @@ class SoftwarePackage : SchemaBase * is specific to a particular institution and computing environment as * the Environment Modules system does not have a common namespace or * standardized naming convention. - * * This last example is the least portable and should only be used if * mechanisms based off of the `package` field or more generic IRIs are * unavailable or unsuitable. While harmless to other sites, site specific @@ -1859,15 +1747,12 @@ class Dirent : SchemaBase /** * If the value is a string literal or an expression which evaluates to a * string, a new file must be created with the string as the file contents. - * * If the value is an expression that evaluates to a `File` object, this * indicates the referenced file should be added to the designated output * directory prior to executing the tool. - * * If the value is an expression that evaluates to a `Dirent` object, this * indicates that the File or Directory in `entry` should be added to the * designated output directory with the name in `entryname`. - * * If `writable` is false, the file may be made available using a bind * mount or file system link to avoid unnecessary copying of the input * file. @@ -1879,7 +1764,6 @@ class Dirent : SchemaBase * CommandLineTool process. This may be implemented by making a copy of * the original file or directory. Default false (files and directories * read-only by default). - * * A directory marked as `writable: true` implies that all files and * subdirectories are recursively writable as well. */ @@ -1902,10 +1786,8 @@ class InitialWorkDirRequirement : SchemaBase /** * The list of files or subdirectories that must be placed in the * designated output directory prior to executing the command line tool. - * * May be an expression. If so, the expression return value must validate * as `{type: array, items: [File, Directory]}`. - * * Files or Directories which are listed in the input parameters and * appear in the `InitialWorkDirRequirement` listing must have their * `path` set to their staged location in the designated output directory. @@ -1963,24 +1845,18 @@ class ShellCommandRequirement : SchemaBase /** * Specify basic hardware resource requirements. - * * "min" is the minimum amount of a resource that must be reserved to schedule * a job. If "min" cannot be satisfied, the job should not be run. - * * "max" is the maximum amount of a resource that the job shall be permitted * to use. If a node has sufficient resources, multiple jobs may be scheduled * on a single node provided each job's "max" resource requirements are * met. If a job attempts to exceed its "max" resource allocation, an * implementation may deny additional resources, which may result in job * failure. - * * If "min" is specified but "max" is not, then "max" == "min" * If "max" is specified by "min" is not, then "min" == "max". - * * It is an error if max < min. - * * It is an error if the value of any of these fields is negative. - * * If neither "min" nor "max" is specified for a resource, an implementation may provide a default. */ class ResourceRequirement : SchemaBase @@ -2036,12 +1912,10 @@ class ExpressionToolOutputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -2051,16 +1925,13 @@ class ExpressionToolOutputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -2070,7 +1941,6 @@ class ExpressionToolOutputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -2091,11 +1961,10 @@ class ExpressionToolOutputParameter : SchemaBase Either!(None, CommandOutputBinding) outputBinding_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This is the file format that will be assigned to * the output parameter. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -2121,7 +1990,6 @@ class ExpressionToolOutputParameter : SchemaBase * values. Input parameters include a schema for each parameter which is * used to validate the input object. It may also be used to build a user * interface for constructing the input object. - * * When accepting an input object, all input parameters must have a value. * If an input parameter is missing from the input object, it must be * assigned a value of `null` (or the value of `default` for that @@ -2207,12 +2075,10 @@ class WorkflowOutputParameter : SchemaBase Either!(None, string) label_; /** * Only valid when `type: File` or is an array of `items: File`. - * * Provides a pattern or expression specifying files or directories that * must be included alongside the primary file. All listed secondary * files must be present. An implementation may fail workflow execution * if an expected secondary file does not exist. - * * If the value is an expression, the value of `self` in the expression * must be the primary input or output File object to which this binding * applies. The `basename`, `nameroot` and `nameext` fields must be @@ -2222,16 +2088,13 @@ class WorkflowOutputParameter : SchemaBase * `path` or `location` and `basename` fields set, or an array consisting * of strings or File or Directory objects. It is legal to reference an * unchanged File or Directory object taken from input as a secondaryFile. - * * To work on non-filename-preserving storage systems, portable tool * descriptions should avoid constructing new values from `location`, but * should construct relative references using `basename` or `nameroot` * instead. - * * If a value in `secondaryFiles` is a string that is not an expression, * it specifies that the following pattern should be applied to the path * of the primary file to yield a filename relative to the primary File: - * * 1. If string begins with one or more caret `^` characters, for each * caret, remove the last file extension from the path (the last * period `.` and all following characters). If there are no file @@ -2241,7 +2104,6 @@ class WorkflowOutputParameter : SchemaBase Either!(None, string, Expression, Either!(string, Expression)[]) secondaryFiles_; /** * Only valid when `type: File` or is an array of `items: File`. - * * A value of `true` indicates that the file is read or written * sequentially without seeking. An implementation may use this flag to * indicate whether it is valid to stream file contents using a named @@ -2262,11 +2124,10 @@ class WorkflowOutputParameter : SchemaBase Either!(None, CommandOutputBinding) outputBinding_; /** * Only valid when `type: File` or is an array of `items: File`. - * * This is the file format that will be assigned to * the output parameter. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specifies one or more workflow parameters that supply the value of to * the output parameter. @@ -2291,36 +2152,27 @@ class WorkflowOutputParameter : SchemaBase * The input of a workflow step connects an upstream parameter (from the * workflow inputs, or the outputs of other workflows steps) with the input * parameters of the underlying step. - * * ## Input object - * * A WorkflowStepInput object must contain an `id` field in the form * `#fieldname` or `#prefix/fieldname`. When the `id` field contains a slash * `/` the field name consists of the characters following the final slash * (the prefix portion may contain one or more slashes to indicate scope). * This defines a field of the workflow step input object with the value of * the `source` parameter(s). - * * ## Merging - * * To merge multiple inbound data links, * [MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified * in the workflow or workflow step requirements. - * * If the sink parameter is an array, or named in a [workflow * scatter](#WorkflowStep) operation, there may be multiple inbound data links * listed in the `source` field. The values from the input links are merged * depending on the method specified in the `linkMerge` field. If not * specified, the default method is "merge_nested". - * * * **merge_nested** - * * The input must be an array consisting of exactly one entry for each * input link. If "merge_nested" is specified with a single link, the value * from the link must be wrapped in a single-item list. - * * * **merge_flattened** - * * 1. The source and sink parameters must be compatible types, or the source * type must be compatible with single element from the "items" type of * the destination array parameter. @@ -2353,20 +2205,16 @@ class WorkflowStepInput : SchemaBase /** * To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must * be specified in the workflow or workflow step requirements. - * * If `valueFrom` is a constant string value, use this as the value for * this input parameter. - * * If `valueFrom` is a parameter reference or expression, it must be * evaluated to yield the actual value to be assiged to the input field. - * * The `self` value in the parameter reference or expression must be * 1. `null` if there is no `source` field * 2. the value of the parameter(s) specified in the `source` field when this * workflow input parameter **is not** specified in this workflow step's `scatter` field. * 3. an element of the parameter specified in the `source` field when this workflow input * parameter **is** specified in this workflow step's `scatter` field. - * * The value of `inputs` in the parameter reference or expression must be * the input object to the workflow step after assigning the `source` * values, applying `default`, and then scattering. The order of @@ -2425,55 +2273,42 @@ class ScatterMethod : SchemaBase * underlying process implementation (such as `CommandLineTool` or another * `Workflow`) in the `run` field and connects the input and output parameters * of the underlying process to workflow parameters. - * * # Scatter/gather - * * To use scatter/gather, * [ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified * in the workflow or workflow step requirements. - * * A "scatter" operation specifies that the associated workflow step or * subworkflow should execute separately over a list of input elements. Each * job making up a scatter operation is independent and may be executed * concurrently. - * * The `scatter` field specifies one or more input parameters which will be * scattered. An input parameter may be listed more than once. The declared * type of each input parameter is implicitly becomes an array of items of the * input parameter type. If a parameter is listed more than once, it becomes * a nested array. As a result, upstream parameters which are connected to * scattered parameters must be arrays. - * * All output parameter types are also implicitly wrapped in arrays. Each job * in the scatter results in an entry in the output array. - * * If any scattered parameter runtime value is an empty array, all outputs are * set to empty arrays and no work is done for the step, according to * applicable scattering rules. - * * If `scatter` declares more than one input parameter, `scatterMethod` * describes how to decompose the input into a discrete set of jobs. - * * * **dotproduct** specifies that each of the input arrays are aligned and one * element taken from each array to construct each job. It is an error * if all input arrays are not the same length. - * * * **nested_crossproduct** specifies the Cartesian product of the inputs, * producing a job for every combination of the scattered inputs. The * output must be nested arrays for each level of scattering, in the * order that the input arrays are listed in the `scatter` field. - * * * **flat_crossproduct** specifies the Cartesian product of the inputs, * producing a job for every combination of the scattered inputs. The * output arrays must be flattened to a single level, but otherwise listed in the * order that the input arrays are listed in the `scatter` field. - * * # Subworkflows - * * To specify a nested workflow as part of a workflow step, * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be * specified in the workflow or workflow step requirements. - * * It is a fatal error if a workflow directly or indirectly invokes itself as * a subworkflow (recursive workflows are not allowed). */ @@ -2495,7 +2330,7 @@ class WorkflowStep : SchemaBase * Defines the parameters representing the output of the process. May be * used to generate and/or validate the output object. */ - @link Either!(Either!(string, WorkflowStepOutput)[]) out_; + Either!(Either!(string, WorkflowStepOutput)[]) out_; /** * Declares requirements that apply to either the runtime environment or the * workflow engine that must be met in order to execute this workflow step. If @@ -2540,44 +2375,34 @@ class WorkflowStep : SchemaBase * A workflow describes a set of **steps** and the **dependencies** between * those steps. When a step produces output that will be consumed by a * second step, the first step is a dependency of the second step. - * * When there is a dependency, the workflow engine must execute the preceding * step and wait for it to successfully produce output before executing the * dependent step. If two steps are defined in the workflow graph that * are not directly or indirectly dependent, these steps are **independent**, * and may execute in any order or execute concurrently. A workflow is * complete when all steps have been executed. - * * Dependencies between parameters are expressed using the `source` field on * [workflow step input parameters](#WorkflowStepInput) and [workflow output * parameters](#WorkflowOutputParameter). - * * The `source` field expresses the dependency of one parameter on another * such that when a value is associated with the parameter specified by * `source`, that value is propagated to the destination parameter. When all * data links inbound to a given step are fufilled, the step is ready to * execute. - * * ## Workflow success and failure - * * A completed step must result in one of `success`, `temporaryFailure` or * `permanentFailure` states. An implementation may choose to retry a step * execution which resulted in `temporaryFailure`. An implementation may * choose to either continue running other steps of a workflow, or terminate * immediately upon `permanentFailure`. - * * * If any step of a workflow execution results in `permanentFailure`, then * the workflow status is `permanentFailure`. - * * * If one or more steps result in `temporaryFailure` and all other steps * complete `success` or are not executed, then the workflow status is * `temporaryFailure`. - * * * If all workflow steps are executed and complete with `success`, then the * workflow status is `success`. - * * # Extensions - * * [ScatterFeatureRequirement](#ScatterFeatureRequirement) and * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are * available as standard [extensions](#Extensions_and_Metadata) to core @@ -2595,7 +2420,6 @@ class WorkflowStep : SchemaBase * values. Input parameters include a schema for each parameter which is * used to validate the input object. It may also be used to build a user * interface for constructing the input object. - * * When accepting an input object, all input parameters must have a value. * If an input parameter is missing from the input object, it must be * assigned a value of `null` (or the value of `default` for that diff --git a/source/cwl_d_auto/v1_1.d b/source/cwl_d_auto/v1_1.d index c577b97..d032c41 100644 --- a/source/cwl_d_auto/v1_1.d +++ b/source/cwl_d_auto/v1_1.d @@ -1,7 +1,7 @@ /** * Generated by schema-salad code generator * - * Date: 2022-11-10 + * Date: 2022-11-19 */ module cwl_d_auto.v1_1; @@ -98,7 +98,7 @@ class EnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -354,7 +354,7 @@ class File : SchemaBase * root of the document. If no ontologies are specified in `$schemas`, the * runtime may perform exact file format matches. */ - @link Either!(None, string) format_; + Either!(None, string) format_; /** * File contents literal. Maximum of 64 KiB. * If neither `location` nor `path` is provided, `contents` must be @@ -591,7 +591,7 @@ class InputRecordField : SchemaBase * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * Read up to the first 64 KiB of text from the file and place it in the @@ -649,7 +649,7 @@ class InputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -772,7 +772,7 @@ class OutputRecordField : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; mixin genCtor; mixin genIdentifier; @@ -814,7 +814,7 @@ class OutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1257,7 +1257,7 @@ class CommandInputRecordField : SchemaBase * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * Read up to the first 64 KiB of text from the file and place it in the @@ -1323,7 +1323,7 @@ class CommandInputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1454,7 +1454,7 @@ class CommandOutputRecordField : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Describes how to generate this output object based on the files * produced by a CommandLineTool @@ -1501,7 +1501,7 @@ class CommandOutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1624,7 +1624,7 @@ class CommandInputParameter : SchemaBase * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * Read up to the first 64 KiB of text from the file and place it in the @@ -1732,7 +1732,7 @@ class CommandOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -2535,7 +2535,7 @@ class ExpressionToolOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -2615,7 +2615,7 @@ class WorkflowInputParameter : SchemaBase * parameter, preferrably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * Read up to the first 64 KiB of text from the file and place it in the @@ -2819,7 +2819,7 @@ class WorkflowOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specifies one or more workflow parameters that supply the value of to * the output parameter. @@ -3055,7 +3055,7 @@ class WorkflowStep : SchemaBase * Defines the parameters representing the output of the process. May be * used to generate and/or validate the output object. */ - @link Either!(Either!(string, WorkflowStepOutput)[]) out_; + Either!(Either!(string, WorkflowStepOutput)[]) out_; /** * Declares requirements that apply to either the runtime environment or the * workflow engine that must be met in order to execute this workflow step. If @@ -3269,15 +3269,15 @@ unittest import std : dirEntries, SpanMode; auto resourceDir = "resources/cwl-v1.1"; - foreach (file; dirEntries(resourceDir, SpanMode.depth)) - { - import std : assertNotThrown, baseName, format, startsWith; - import salad.resolver : absoluteURI; - - if (!file.baseName.startsWith("valid")) - { - continue; - } - importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file)); - } + foreach (file; dirEntries(resourceDir, SpanMode.depth)) + { + import std : assertNotThrown, baseName, format, startsWith; + import salad.resolver : absoluteURI; + + if (!file.baseName.startsWith("valid")) + { + continue; + } + importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file)); + } } diff --git a/source/cwl_d_auto/v1_2.d b/source/cwl_d_auto/v1_2.d index 61844b4..b3bee16 100644 --- a/source/cwl_d_auto/v1_2.d +++ b/source/cwl_d_auto/v1_2.d @@ -1,7 +1,7 @@ /** * Generated by schema-salad code generator * - * Date: 2022-11-10 + * Date: 2022-11-19 */ module cwl_d_auto.v1_2; @@ -98,7 +98,7 @@ class EnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -360,7 +360,7 @@ class File : SchemaBase * root of the document. If no ontologies are specified in `$schemas`, the * runtime may perform exact file format matches. */ - @link Either!(None, string) format_; + Either!(None, string) format_; /** * File contents literal. * If neither `location` nor `path` is provided, `contents` must be @@ -604,7 +604,7 @@ class InputRecordField : SchemaBase * parameter, preferably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * If true, the file (or each file in the array) must be a UTF-8 @@ -666,7 +666,7 @@ class InputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -789,7 +789,7 @@ class OutputRecordField : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; mixin genCtor; mixin genIdentifier; @@ -831,7 +831,7 @@ class OutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1316,7 +1316,7 @@ class CommandInputRecordField : SchemaBase * parameter, preferably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * If true, the file (or each file in the array) must be a UTF-8 @@ -1386,7 +1386,7 @@ class CommandInputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1517,7 +1517,7 @@ class CommandOutputRecordField : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Describes how to generate this output object based on the files * produced by a CommandLineTool @@ -1564,7 +1564,7 @@ class CommandOutputEnumSchema : SchemaBase /** * Defines the set of valid symbols. */ - @link string[] symbols_; + string[] symbols_; /** * Must be `enum` */ @@ -1687,7 +1687,7 @@ class CommandInputParameter : SchemaBase * parameter, preferably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * If true, the file (or each file in the array) must be a UTF-8 @@ -1799,7 +1799,7 @@ class CommandOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -2025,7 +2025,7 @@ class stderr : SchemaBase * specific Operation concept like * [Split read mapping](http://edamontology.org/operation_3199). */ - @link Either!(None, string[]) intent_; + Either!(None, string[]) intent_; /// static immutable class_ = "CommandLineTool"; /** @@ -2713,7 +2713,7 @@ class ExpressionToolOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -2793,7 +2793,7 @@ class WorkflowInputParameter : SchemaBase * parameter, preferably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * If true, the file (or each file in the array) must be a UTF-8 @@ -2913,7 +2913,7 @@ class WorkflowInputParameter : SchemaBase * specific Operation concept like * [Split read mapping](http://edamontology.org/operation_3199). */ - @link Either!(None, string[]) intent_; + Either!(None, string[]) intent_; /// static immutable class_ = "ExpressionTool"; /** @@ -3039,7 +3039,7 @@ class WorkflowOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specifies one or more names of an output from a workflow step (in the form * `step_name/output_name` with a `/` separator`), or a workflow input name, @@ -3357,7 +3357,7 @@ class WorkflowStep : SchemaBase * Defines the parameters representing the output of the process. May be * used to generate and/or validate the output object. */ - @link Either!(Either!(string, WorkflowStepOutput)[]) out_; + Either!(Either!(string, WorkflowStepOutput)[]) out_; /** * Declares requirements that apply to either the runtime environment or the * workflow engine that must be met in order to execute this workflow step. If @@ -3507,7 +3507,7 @@ class WorkflowStep : SchemaBase * specific Operation concept like * [Split read mapping](http://edamontology.org/operation_3199). */ - @link Either!(None, string[]) intent_; + Either!(None, string[]) intent_; /// static immutable class_ = "Workflow"; /** @@ -3658,7 +3658,7 @@ class OperationInputParameter : SchemaBase * parameter, preferably defined within an ontology. If no ontology is * available, file formats may be tested by exact match. */ - @link Either!(None, string, string[], Expression) format_; + Either!(None, string, string[], Expression) format_; /** * Only valid when `type: File` or is an array of `items: File`. * If true, the file (or each file in the array) must be a UTF-8 @@ -3765,7 +3765,7 @@ class OperationOutputParameter : SchemaBase * This is the file format that will be assigned to the output * File object. */ - @link Either!(None, string, Expression) format_; + Either!(None, string, Expression) format_; /** * Specify valid types of data that may be assigned to this parameter. */ @@ -3853,7 +3853,7 @@ class OperationOutputParameter : SchemaBase * specific Operation concept like * [Split read mapping](http://edamontology.org/operation_3199). */ - @link Either!(None, string[]) intent_; + Either!(None, string[]) intent_; /// static immutable class_ = "Operation"; @@ -3874,15 +3874,15 @@ unittest import std : dirEntries, SpanMode; auto resourceDir = "resources/cwl-v1.2"; - foreach (file; dirEntries(resourceDir, SpanMode.depth)) - { - import std : assertNotThrown, baseName, format, startsWith; - import salad.resolver : absoluteURI; - - if (!file.baseName.startsWith("valid")) - { - continue; - } - importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file)); - } + foreach (file; dirEntries(resourceDir, SpanMode.depth)) + { + import std : assertNotThrown, baseName, format, startsWith; + import salad.resolver : absoluteURI; + + if (!file.baseName.startsWith("valid")) + { + continue; + } + importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file)); + } }