- Why a CWL subset
- Example
- Supported input fields
- Supported types
- Supported binding fields
- Deliberately unsupported features
- Representation boundaries
Inputs declares package-specific configurable inputs using a deliberately
scoped subset of
CWL v1.2 CommandLineTool.inputs.
The AVPR wrapper remains PascalCase Inputs, consistently with the other
package metadata. Its value uses CWL's array form and can be
placed under the lowercase inputs field of a complete CWL
CommandLineTool.
AVPR publishes a compatible CWL fragment; package frontmatter is not a complete CWL document, and the registry is not a general CWL runner.
Package inputs need more than documentation: downstream tools must be able to validate values and eventually construct deterministic command lines. Reusing CWL provides established names and semantics for types, nullability, prefixes, and ordering instead of creating an AVPR-only schema.
The first release supports the configuration needed by current validation scripts while keeping parsing, persistence, OpenAPI, generated clients, and future argument construction unambiguous:
- Six scalar primitives map directly to portable command-line values.
- One nullable shorthand avoids multiple wire shapes for the same meaning.
- Two binding fields cover flags, options, and deterministic ordering.
- Array form maps directly to the registry's ordered collection and owned JSON model while retaining explicit input IDs.
Complex CWL types are deferred until the registry and downstream runner can implement their staging, path, validation, and serialization semantics.
$schema: "https://avpr.nfdi4plants.org/schemas/v1/validation-package-frontmatter.schema.json"
Inputs:
- id: echo
type: string?
label: Echo text
doc: Print the supplied text
inputBinding:
prefix: --echo
- id: verbose
type: boolean?
label: Verbose logging
doc: Enable verbose logging
inputBinding:
prefix: --verbose
- id: output
type: string
doc: Select the output file
inputBinding:
position: 2
prefix: --output| CWL field | Supported value | Mandatory |
|---|---|---|
id |
Non-empty string, unique within the package | yes |
type |
Supported scalar string, optionally followed by one ? |
yes |
label |
string | no |
doc |
string | no |
inputBinding |
Supported binding object | yes |
Nested names remain exactly lower-camel-case in frontmatter, public JSON, OpenAPI, and generated-client serialization.
booleanintlongfloatdoublestring
Appending exactly one ? makes a value nullable, for example boolean? or
string?. This shorthand is the only accepted nullable representation. CWL
also permits union arrays such as type: ["null", "string"], but accepting
both would expose two public shapes for the same meaning and complicate schema
generation, clients, and storage.
Do not add a separate Required property. Requiredness is represented by the
type: string requires a value, while string? permits omission or null.
| CWL field | Supported value | Default |
|---|---|---|
prefix |
One non-empty canonical string | required |
position |
integer | 0 |
Binding behavior follows CWL:
- A boolean
trueemits its prefix;falseemits nothing. A nullable boolean also emits nothing for null. Boolean flags never emit a trailingtrueorfalsevalue. - A non-boolean always emits prefix and value as two argv elements.
- Missing
positionuses position0; equal positions are resolved deterministically by input ID. - Prefixes are exact and unique. They cannot be
--,-i,-o,--source-branch, or--source-commit-hash.
CWL defines one binding prefix, not aliases. A package script may independently
accept -v as well as --verbose, but only one canonical prefix belongs in
the structured contract.
The first subset does not support:
File,Directory, orstdin, which need path and staging semantics;- arrays, records, and enums;
- union-array syntax or general unions;
- user-defined or IRI types;
- CWL maps keyed by input ID.
Additional parameter or binding fields such as default, secondaryFiles,
format, valueFrom, itemSeparator, shellQuote, and separate are
rejected. Positional inputs are likewise rejected. Unsupported type values
and shapes fail with an actionable diagnostic.
The extracted metadata mapping carries
$schema: https://avpr.nfdi4plants.org/schemas/v1/validation-package-frontmatter.schema.json.
The schema is also shipped as
schemas/validation-package-frontmatter.schema.json in every
ValidationPackage.Codecs artifact and served byte-for-byte at its $schema
URL. Runtime parsing selects its decoder from an offline allowlist and never
fetches the URI.
- Frontmatter and public API JSON expose
typeas one scalar such asboolean?. - OpenAPI enumerates the twelve required/nullable scalar strings.
- The generated client maps that scalar to its client representation.
- PostgreSQL alone stores a normalized primitive/nullability object inside the
owned
InputsJSON document.
The internal database object must never leak through the API. Existing packages
without Inputs are represented by an empty collection, including rows
backfilled during migration.
Declaring inputs does not install an argument parser in a package script.
Scripts remain responsible for interpreting argv until downstream execution
support lands in arc-validate.