-
Notifications
You must be signed in to change notification settings - Fork 135
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
Implement Metaschema #736
Implement Metaschema #736
Conversation
A couple notes from the discussion today:
|
A few observations from playing with additional constraints on metaschemas:
|
@rroupski --
|
There are other “exceptions”, for example, the The reason is that the enumerated values are defined in some other standard or document. The OCSF schema uses those external values in the enum to define the expected set of correct values for the attribute. |
The default value in the |
@alanisaac I'll talk to @pagbabian-splunk to find a home for this tool. It looks like there are 2 features defined in this PR:
Correct? |
Ah I missed these. Thanks for the clarification!
That's correct. I know there was some discussion about 1. living in a different repository. Either way, I think there would be value in adding it to this repository's checks via GitHub Actions in order to enforce some of the validation that the schema can provide. Ensuring the tests pass also makes sure that the metaschema itself is always correct. |
As discussed in meetings and Slack, I have updated this PR to only include the metaschemas themselves in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving the ball forward 🚀
Some comments and questions here as per our call tonight. In general I like the idea of a metaschema especially if it helps providing self documentation. I have a question out of curiosity. We had the discussion on whether some attributes should be passed with a length or size limit. Would you be able to cover this aspect with this proposal? |
Something to clarify here is that there are two main concepts in OCSF: the schema definition files and the schemas. The files in this repository are the schema definition files, and the documents you can retrieve from the OCSF server, such as this one are the OCSF schemas. So when we're talking about length or size limits for fields, it could mean:
I believe your question is referring to 2., but I wanted to call out both for clarity. In order to enforce max lengths for attribute values, we'd want to add a feature to the schema definition files that can specify it. Metaschemas could absolutely allow and enforce that this hypothetical "max length" or "max size" field is used properly, but I think introducing this as a concept would likely best be served as a part of a separate issue. There's a similar issue asking about array size constraints here: #779 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to move ahead!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Looking forward to getting the ball rolling on metaschema
. Thanks Alan and Jeremy.
@dkolbly @floydtree @mikeradka -- I see this is approved, though I cannot merge it on my own. Any final checks to do here? |
Thanks for reaching out, I just ran one last few bit of checks on the server side to be safe. I think we are good to go! |
Related Issue:
#735
Description of changes:
This PR is an implementation of "metaschemas", or JSON schemas that describe OCSF's schema. I started with the "object" and "event" schemas.