https://gerrit.wikimedia.org/r/c/schemas/event/secondary/+/757879 is a fix to a change that CI should not have allowed us to merge. We should make sure it errors next time that happens.
Description
Description
Related Objects
Related Objects
Event Timeline
Comment Actions
Here is an example of how we are already asserting that the schema title match the schema file path:
https://github.com/wikimedia/jsonschema-tools/blob/master/lib/tests/structure.js#L179-L182
We should make a another similar assertion just below that the schema $id matches the schema file path.
I.e. if the $id is /rdf_streaming_updater/reconcile/1.0.0, relativeSchemaPath should be rdf_streaming_updater/reconcile
That part of the code is already asserting things about schemaInfoForContentType, which is a 'schemaInfo' object as returned by schemaPathToInfo function. That object has a schema field, so you should be able to access the $id as schemaInfoForContentType.schema['$id'].