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
feat: Add schema validation and data combination script
This commit introduces two main features to improve data quality and ease of use:
Schema Validation:
A schemas.json file is added to define a strict schema for each of the mapping files.
A new lint-schemas.js script validates the mapping files against these schemas. It also checks that all feature IDs exist in the web-features package.
Combined Data:
A new combine-mappings.js script aggregates data from all individual mapping files into a single web-features-mappings.combined.json file. This provides a single, convenient file for data consumers.
The package.json has been updated with lint:schemas and combine scripts to run these new tools. The README and .gitignore have also been updated accordingly.
Copy file name to clipboardExpand all lines: README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Examples of data sources which already map to web-features IDs and for which we
45
45
46
46
## The scripts folder
47
47
48
-
The `/script/` folder contains the JavaScript files that are responsible for updating the mapping files.
48
+
The `/scripts/` folder contains the JavaScript files that are responsible for updating the mapping files.
49
49
50
50
To run these scripts:
51
51
@@ -63,6 +63,20 @@ The mappings are JSON files that are formatted as follows:
63
63
}
64
64
```
65
65
66
+
## Combined data
67
+
68
+
The `combine` script generates a `web-features-mappings.combined.json` file in the root of the repository. This file contains all the mapping data from the `mappings` folder, combined into a single file.
0 commit comments