Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced validation messages for key errors. #27

Merged
merged 1 commit into from
May 13, 2024

Conversation

alanisaac
Copy link
Collaborator

Fixes #20

This PR:

  • Adds another sentence to the key-based errors in the ocsf-validator to help schema developers understand that the errors could be in the source file OR referenced files.
  • Removed the "class" part of the message, which would display as OcsfAttr. While this might be useful for debugging the validation library, schema developers would not know what that is referencing unless they checked the code of this library.

Examples:

   ERROR: Unrecognized key `foo` at `attributes.transaction_uid` in events/network/dhcp.json.  Make sure fields in this file and any supporting files such as dictionaries or includes are valid.
   ERROR: Missing required key `caption` at `attributes.transaction_uid` in events/network/dhcp.json.  Make sure required fields in this file and any supporting files such as dictionaries or includes are populated.

@query-jeremy query-jeremy merged commit d6637d5 into ocsf:main May 13, 2024
5 checks passed
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.

Enhance validation output
3 participants