Skip to content

Commit

Permalink
Print out the required keys per survey object
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasyishak committed Sep 14, 2023
1 parent 4d24a40 commit 5a1456a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion surveys/survey-validator/lib/survey_validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void checkJson(File contextualSurveyFile) {
// Ensure that the number of keys found in each object is correct
if (surveyObject.keys.length != requiredKeys.length) {
throw ArgumentError(
'There should only be ${requiredKeys.length} keys per survey object');
'There should only be ${requiredKeys.length} keys per survey object\n'
'The required keys are: ${requiredKeys.join(', ')}');
}

// Ensure that the keys themselves match what has been defined
Expand Down

0 comments on commit 5a1456a

Please sign in to comment.