Skip to content

Conversation

@dmendelowitz
Copy link
Contributor

Summary

Allow notificationInfo to be empty and with the required fields only being required if any other field is present.

New behavior

Required fields for notificationInfo are now dependencies in the schema, meaning they are only required if other fields are present. This allows for notificationInfo to be on the config editor page of the extraction UI but not have to be filled out.

Code changes

  • Required fields of notificationInfo in config.schema.json changed to be dependencies instead
  • Since an empty notificationInfo is now valid, I also added a check in app.js to make sure the notificationInfo is not empty before trying to send a notification

Testing guidance

  • Make sure validation fails if notificationInfo has at least one field present but not all required fields
  • Make sure empty notificationInfo passes validation and does not trigger a notification being sent
  • Test on the extraction UI by changing the mcode-extraction-framework dependency to this branch
  • Leaving all notificationInfo fields blank in the config editor should not cause an error, but adding a value for any one field should lead to the required fields now being required

Copy link
Contributor

@julianxcarter julianxcarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! I can confirm that validation of the notificationInfo section of the config in the MEF still works fine, and also that this addresses the notificationInfo always being required in the Extraction UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants