Schemas used by Mozilla Nimbus and related projects.
npm install @mozilla/nimbus-schemasThis directory contains a package of schemas published to various repositories for use by different parts of the Mozilla Nimbus experimentation ecosystem.
make schemas_buildmake schemas_checkmake schemas_formatExample
Creating a new sub-package new_stuff
1. Add new directory mozilla_nimbus_schemas / new_stuff with schemas inside.
1. Add new_stuff schemas to the new_stuff directory's __init__.py file.
1. Add new_stuff to top level __init__.py:
>from mozilla_nimbus_schemas.new_stuff import *
1. Generate Typescript and/or JSON Schemas for new_stuff by updating the generate_json_schema.py script like so:
a. Import new_stuff alongside existing mozilla_nimbus_schemas imports, e.g.,
>from mozilla_nimbus_schemas import experiments, jetstream, new_stuff
b. (optional) Add new_stuff to Typescript generation
* Update TS_SCHEMA_PACKAGES list, e.g.,
>TS_SCHEMA_PACKAGES = [experiments, jetstream, new_stuff]
c. (optional) Add new_stuff to JSON Schema generation
* Update JSON_SCHEMA_PACKAGES list, e.g.,
>JSON_SCHEMA_PACKAGES = [experiments, new_stuff]
1. Build everything with make schemas_build
1. Update the version (see Versioning below).
Contains schemas describing analysis results, metadata, and errors from Jetstream.
Defines the schemas used for validating the Experimenter v6 API. Previously defined in the now-deprecated nimbus-shared.
main branch when the version number changes. Schemas are published to various repos for access in different languages.mozilla-nimbus-schemas uses semantic versioning (semver) of major.minor.patch. Previously, weCalVer), which is why the version is so high (3000+). Any#### Version Updates
1. To update the published package versions, update the VERSION file in this directory.
- From the project root, you can run the helper script:
- ./scripts/set_schemas_version.sh
- Or write to the file:
- echo
- Or simply edit the file in any text editor.
2. Update the package versions with the new VERSION file:
- make schemas_version
mozilla-nimbus-schemas@mozilla/nimbus-schemas