ocsf-server
ocsf-server copied to clipboard
JSON Schema export
It would be nice to be able to export the whole JSON schema via the Schema server for internal usage.
Some other nice features would be adding a switch to tell the server how deep you want it to go when exporting some of the circular nested fields
Note that, json-schema of a class is already exportable via the server. Check "JSON Schema" button in the screenshot below.
I was just looking into this. I think this is documented in the api docs here https://schema.ocsf.io/doc/index.html#/Schema%20Export/SchemaWeb_SchemaController_export_schema. an example would be https://schema.ocsf.io/export/schema?extenions=linux,win. What I'm currently on sure of is how the profiles affect the schema exported. When I apply profiles they seem to get smaller.
@overly-engineered:
Two things to note:
- The
/export/schema
URL and the other/export
URLs return the OCSF's own definition format. These are not in JSON Schema format. The JSON Schema exporting is on the/schema
URL paths. - The
extensions
andprofiles
parameters are filters. Without them, all extensions and profiles are included. With them, only the extensions and profiles specified are included. The documentation isn't clear that this is a filtering mechanism, and doesn't mention that if the parameter is supplied but is empty, it means filter out all.
Ah that is good to know. Thanks @rmouritzen-splunk!