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

JSON Schema export #73

Open
zschmerber opened this issue Feb 27, 2024 · 4 comments
Open

JSON Schema export #73

zschmerber opened this issue Feb 27, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@zschmerber
Copy link

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

@zschmerber zschmerber added the enhancement New feature or request label Feb 27, 2024
@floydtree
Copy link
Contributor

Note that, json-schema of a class is already exportable via the server. Check "JSON Schema" button in the screenshot below.

Screenshot 2024-02-27 at 13 06 28

@overly-engineered
Copy link

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.

@rmouritzen-splunk
Copy link
Contributor

@overly-engineered:

Two things to note:

  1. 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.
  2. The extensions and profiles 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.

@overly-engineered
Copy link

Ah that is good to know. Thanks @rmouritzen-splunk!

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

No branches or pull requests

5 participants