This schema repository contains schemas for events that do not directly affect user-facing features. These schemas represent "Tier 2" events. This repository complements the schemas/event/primary repository.
NOTE: The reason for having separate event schema repositories is to allow for different repository merge rights. Changes to primary schemas are subject to more restrictions than secondary schemas.
Schemas can be retrieved via the Web API at schema.wikimedia.org, for example:
curl https://schema.wikimedia.org/repositories/secondary/jsonschema/fragment/analytics/common/latest.json
Most files in this repo are automatically generated by jsonschema-tools and must not be changed after their initial creation.
Follow the Event Platform Schema Guidelines when creating or updating schemas.
Prerequisites:
- A clone of this Git repository.
- Run
npm install.
To update a schema:
- Edit the
current.yamlfile, and remember to increment the version in the$idfield. ALWAYS increment the version after making changes tocurrent.yaml. - Run
npm run build-modified, which generates the versioned YAML and JSON files. - Commit the new and changed files to Git, and submit them for code review.
To create a schema:
- Create a subdirectory for the schema under one of the
jsonschema/namespace directories, and draft the first version in a newcurrent.yamlfile. - Run
npm run build-new path/to/your/current.yaml, which generates the versioned YAML and JSON files. - Commit the new files to Git, and submit them for code review.
Namespaces:
-
analytics: Schemas that are used for analytics and "instrumentation" purposes should go in thejsonschema/analytics/directory. -
analytics/legacy: This directory is for legacy EventLogging schemas that have been migrated from meta.wikimedia.org's Schema namespace. After the associated instrument(s) are updated to use the migrated schema, all updates to the schema must be made in this repository, not on the legacy Schema page on Meta-Wiki.NOTE: Schemas in
analytics/legacyare excluded from schema robustness tests.