Repository navigation
Find a referenced schema next to the schema that references it - #232
Merged
pinin4fjords merged 5 commits intoOct 2, 2026
Merged
Conversation
…ces it A schema named by the 'schema' keyword was only looked up relative to the project that runs. When the parameters schema belongs to another directory, for example when a pipeline is included in another one, the referenced schema was not found. The directory of the schema being validated is tried first, then the project as before. Fixes nextflow-io#231 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…renced schemas Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nvnieuwk
approved these changes
Oct 2, 2026
nvnieuwk
left a comment
Collaborator
There was a problem hiding this comment.
This makes sense! Thank you
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #231
Use case
A pipeline can be included in another pipeline with pipeline composition (nextflow-io/nextflow#7213, ADR). The included pipeline calls
validateParameters(parameters_schema: ...)with the path of its own schema, but the project that runs is the including pipeline. A schema referenced from its parameters schema with theschemakeyword (for example the samplesheet schema ofinput) is only looked up relative to the running project, so it is not found. The same applies whenever a schema is read from a different directory than the project.What changes
A schema named by the
schemakeyword is looked up next to the schema that references it first, and relative to the project otherwise, so existing pipelines are unaffected. Absolute paths are used as given.The location of the schema is passed to
JsonSchemaValidator.validate()by its callers (validateParameters,samplesheetToList,validateand theschemaevaluator, so that a referenced schema can reference another schema next to itself).Tests
In
ValidateParametersTest, with the parameters schema in a temporary directory:The full test suite passes.
Related
#230 (Channel and Value params) and #234 (nested command line values) are independent fixes for the same kind of pipeline. The CHANGELOG entries are in the same new section, so the second of them to merge needs a rebase.