feat: Add schema validation for combined data #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a new script,
generate-combined-schema.js
, to automatically create a JSON schema for the finalcombined-data.json
file. This new schema accurately reflects the flattened structure of the combined data.The
combine-mappings.js
script is updated to use this generated schema to validate the data before writing the output file, preventing schema-invalid data from being committed.The
schemas.json
file has been reverted to use JSON Schemadraft-07
. There were no features we needed from the other schema type. Plus, this matches the same version used inweb-features
The build process in
package.json
has been updated to include the new schema generation step.Why this change:
This
commit, shifted the structure to move all of the nested schemas under each feature. But as a result, we can not use the existing schema file to validate or generate types for it. Now with the generated combined schema, we can keep the updated combined schema up to date automatically