gecko-dev/toolkit/modules/tests
Barret Rennie 51b6157ed9 Bug 1757809 - Provide a JsonSchema module that supports additional Mozilla-specific formats r=mossop,emcminn
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
2022-03-25 00:01:18 +00:00
..
browser Bug 1753729 - Add system memory and disk size and placeDB page limit to about:support. r=Gijs,fluent-reviewers 2022-03-24 11:43:22 +00:00
chrome
modules Bug 1378173 - Remove Promise.jsm. r=Gijs 2021-10-14 08:28:28 +00:00
xpcshell Bug 1757809 - Provide a JsonSchema module that supports additional Mozilla-specific formats r=mossop,emcminn 2022-03-25 00:01:18 +00:00