Log a warning when wrong CALM core schemas are being loaded
willosborne opened this issue · comments
Feature Request
Description of Problem:
The CALM CLI bundles the meta-schemas it was built against alongside the app.
When a user tries to generate/validate a pattern, these schemas will be made available to the command.
However, if the pattern in use has an outdated schema URL, it will either try to load that schema or report it as missing.
For example, a pattern pointing at an older version of the spec, a version hosted on the old finos-labs repo, etc.
This is really confusing for users and indicates something wrong with how the spec is loaded, rather than just their pattern having the wrong $schema version.
Potential Solutions:
Keep track of the bundled schemas, and log an ERROR warning very clearly if a user is trying to run commands against a different version (and has not manually loaded these via the --schemaDirectory flag.)
This will involve somehow detecting is a pattern URL is the CALM pattern; perhaps if it's got the same path but has the wrong date in the URL.