You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These constraints are in the form of regex, max_length, range and values. All these can be represented in the json-schema that is rendered by our server, helping json-schema based validation use-cases and perform value specific validation. JSON spec has a few built-in string formats that can be leveraged as well.
Further, we can also add constant values for attributes such as class_name, category_name etc, as we render the json-schema of an event class.
We should also include "additionalProperties": false, key in the generated schema to make validation use-cases more feasible. (for each object definition and the event class definition) #112
The string sibling values should also be added as an enum for the corresponding properties
Add requirements based on OCSF "constraints"
The text was updated successfully, but these errors were encountered:
floydtree
changed the title
Include data-type constraints in the JSON schema
JSON schema improvements - Add constraints, enum values
Sep 12, 2024
The current json-schema, e.g. https://schema.ocsf.io/schema/1.3.0/objects/network_endpoint doesn't include the data-type constraints defined in the dictionary - https://github.com/ocsf/ocsf-schema/blob/main/dictionary.json#L4839.
These constraints are in the form of regex, max_length, range and values. All these can be represented in the json-schema that is rendered by our server, helping json-schema based validation use-cases and perform value specific validation. JSON spec has a few built-in string formats that can be leveraged as well.
Further, we can also add
constant
values for attributes such asclass_name
,category_name
etc, as we render the json-schema of an event class.References -
We should also include
"additionalProperties": false,
key in the generated schema to make validation use-cases more feasible. (for each object definition and the event class definition) #112The string sibling values should also be added as an enum for the corresponding properties
Add requirements based on OCSF "constraints"
The text was updated successfully, but these errors were encountered: