Skip to content

Commit

Permalink
launch: improve validation warning for unexpected properties
Browse files Browse the repository at this point in the history
Change the validation warning issued when unexpected properties are
found in the REANA specification to include the path to were the
invalidating keywords were found.

Closes reanahub/reana-client#679.
  • Loading branch information
giuseppe-steduto committed Nov 22, 2023
1 parent 654183c commit f8f7ba1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reana-ui/src/pages/launchOnReana/LaunchOnReana.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export default function LaunchOnReana() {
// Iterate over all keys in validation_warning
for (const key in validation_warnings) {
if (key === "additional_properties") {
const properties = validation_warnings[key].join(", ");
const properties = validation_warnings[key]
.map(
(additionalProperty) =>
`${additionalProperty.property} (at ${additionalProperty.path})`,
)
.join(", ");
warningMessages.push(
`Unexpected properties found in the REANA specification: ${properties}.`,
);
Expand Down

0 comments on commit f8f7ba1

Please sign in to comment.