-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metaschema changed to detect invalid "observable" property in event c…
…lasses, and detect invalid "observables" property in objects. Update CHANGELOG.md with metaschema changes and improvements
- Loading branch information
1 parent
3c7d869
commit db444ca
Showing
4 changed files
with
108 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"$id": "https://schema.ocsf.io/common-event-object.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Object", | ||
"description": "Common metaschema shared between objects and event classes.", | ||
"type": "object", | ||
"anyOf": [ | ||
{ | ||
"required": [ | ||
"description", | ||
"caption", | ||
"name", | ||
"attributes" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"extends" | ||
] | ||
} | ||
], | ||
"properties": { | ||
"@deprecated": { | ||
"$ref": "deprecated.schema.json" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A concise description of the object." | ||
}, | ||
"caption": { | ||
"type": "string", | ||
"description": "A short, human friendly name for the object." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "A name of the object. It must be a unique name. The name is all lower case letters, combine words using underscore.", | ||
"pattern": "^[a-z0-9_]*$" | ||
}, | ||
"extends": { | ||
"type": "string", | ||
"description": "An object that this one extends from." | ||
}, | ||
"constraints": { | ||
"type": "object", | ||
"description": "Constraints that apply to the attribute requirements.", | ||
"properties": { | ||
"at_least_one": { | ||
"type": "array", | ||
"items": {"type": "string"} | ||
}, | ||
"just_one": { | ||
"type": "array", | ||
"items": {"type": "string"} | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"profiles": { | ||
"type": "array", | ||
"items": {"type": "string"}, | ||
"description": "The list of profiles used to create the event." | ||
}, | ||
"attributes": { | ||
"type": "object", | ||
"description": "A dictionary of attributes for the object.", | ||
"properties": { | ||
"$include": { | ||
"description": "A reference to another schema for attributes to include.", | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
} | ||
} | ||
}, | ||
"patternProperties": { | ||
"^[a-z0-9_]*$": { | ||
"$ref": "attribute.schema.json" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters