Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #79 from mirpedrol/fix-definitions-params
Browse files Browse the repository at this point in the history
add parameters from schema top level as expected params
  • Loading branch information
mirpedrol committed Aug 21, 2023
2 parents df5a42b + 2a293c8 commit 8a126eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nextflow-io/nf-validation: Changelog

# Version 0.4.0

- Add parameters defined on the top level of the schema and within the definitions section as expected params ([#79](https://github.com/nextflow-io/nf-validation/pull/79))

## Version 0.3.1

### Bug fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ class SchemaValidator extends PluginExtensionPoint {
def enumsTuple = collectEnums(schemaParams)
def List expectedParams = (List) enumsTuple[0] + addExpectedParams()
def Map enums = (Map) enumsTuple[1]
// Collect expected parameters from the schema when parameters are specified outside of "definitions"
if (parsed.containsKey('properties')) {
def enumsTupleTopLevel = collectEnums(['top_level': ['properties': parsed.get('properties')]])
expectedParams += (List) enumsTupleTopLevel[0]
enums += (Map) enumsTupleTopLevel[1]
}

//=====================================================================//
// Check if files or directories exist
Expand Down

0 comments on commit 8a126eb

Please sign in to comment.