Skip to content

Commit

Permalink
Merge branch 'main' of github.com:i-VRESSE/workflow-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Aug 27, 2024
2 parents 9ef716f + 2c3b0d3 commit f59b3d1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions packages/core/src/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ describe('validateWorkflow()', () => {
type: 'number'
}
}
},
additionalProperties: true
}
},
uiSchema: {

Expand Down Expand Up @@ -484,8 +483,7 @@ describe('validateWorkflow()', () => {
type: 'number'
}
}
},
additionalProperties: true
}
},
uiSchema: {

Expand Down
9 changes: 6 additions & 3 deletions packages/haddock3_catalog/generate_haddock3_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,17 @@ def config2schema(config):
"type": "object",
"properties": properties,
"required": required,
# Ajv only allows props from then|else block if additionalProperties is true
# otherwise ajv will give "must NOT have additional properties" error
"additionalProperties": bool(ifthenelses)
}
if ifthenelses:
if len(ifthenelses) > 1:
raise ValueError(f"Only one ifthenelse is supported, but got {len(ifthenelses)}")
schema.update(list(ifthenelses.values())[0])
else:
# Ajv only allows props from then|else block if additionalProperties is true inplicitly or explicitly
# if additionalProperties=false then ajv will give "must NOT have additional properties" error
# if additionalProperties=true is explict then rjsf will render plus button for adding custom key/value pairs, which is unwanted
# so we make it implicit by not setting additionalProperties
schema['additionalProperties'] = False
return {
"schema": schema,
"uiSchema": uiSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ global:
type: boolean
required:
- run_dir
additionalProperties: true
if:
properties:
mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ global:
type: boolean
required:
- run_dir
additionalProperties: true
if:
properties:
mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ global:
type: boolean
required:
- run_dir
additionalProperties: true
if:
properties:
mode:
Expand Down

0 comments on commit f59b3d1

Please sign in to comment.