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

Add support for defining observables in "patch extends" #83

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

rmouritzen-splunk
Copy link
Contributor

@rmouritzen-splunk rmouritzen-splunk commented Apr 5, 2024

Currently observable definitions are flagged with an "unsupported" error for the patch extends case.

A patch extends is triggered when a class or object (most usefully an extension class or object) is defined with an extends property that refers to a class or object in the core schema, and either the name matches the extends or it doesn't have an extends. This patch allows modification of the class or object in the extends property as shown below, and then the patching item disappears (it isn't added to the schema).

A patch currently does these things:

  • The profiles in the patching item are merged with the base item.
  • The attributes in the patching item are merged with the base item.
  • Observable definitions in the patching item cause an error, regardless of kind (top level object observable, attribute observable, or class attribute path observables).

With this issue we want to support merging the observable definitions from the patching item to the base item.

Fixes issue #82.

Related to PR ocsf/ocsf-validator#19.

@rmouritzen-splunk rmouritzen-splunk merged commit 07ec6d0 into ocsf:main Apr 15, 2024
1 check passed
@rmouritzen-splunk rmouritzen-splunk deleted the patch-observables branch April 15, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants