mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
51b6157ed9
In migrating from Ajv 6 to @cfworker/json-schema, some schemas will no longer validate due to the `format: uri` annotation only being a suggestion for strings in Ajv 6. Our URLs that use %PLACEHOLDERS% (e.g., `%LOCALE%`) will not pass validation as URIs due to being interpreted as invalid URL encoding. Here we add a facade in front of @cfworker/json-schema which defines a `moz-url-format` format for strings, which runs them through Services.urlFormatter.formatURL before attempting to validate them as URIs. We don't simply find-replace all %PLACEHOLDERS% because the URL formatter service only supports certain variables and will leave undefined variables as-is, leading to a validation error (which is what we want). Differential Revision: https://phabricator.services.mozilla.com/D138926 |
||
---|---|---|
.. | ||
browser | ||
chrome | ||
modules | ||
xpcshell |