Create script that generates the final schema
Goal
Turn Eric’s code into a script that generates a final schema (osquery + Fleet). This way, fleetdm.com and the Fleet UI can use the same final schema to render the osquery tables.
@eashaw I assigned you this issue and added it to the release board.
@noahtalerman I have a PR to move the schema merging code from build-static-content.js into a separate file that can be called from other scripts. Once that is merged, we can use it for this script.
I have a few questions about the requirements for this script:
- Will this script need to do anything other than merging the schema and saving it to a file in the repo?
- Where will the merged schema live in the repo?
Will this script need to do anything other than merging the schema and saving it to a file in the repo?
I think the script only needs to merge the schema. For now, we can manually save the schema to the repo. Later, we can address saving it to the repo automatically.
Where will the merged schema live in the repo?
I think the schema/ folder: https://github.com/fleetdm/fleet/tree/main/schema
@lukeheath does the above make sense to you?
cc @eashaw I forgot to tag you ^^