Bug 1821243 - Do not require content and template if id is present in message schema r=omc-reviewers,aminomancer

The schema still imposes the following restrictions:

- Having "template" present makes "content" and "id" required.
- Having "content" present makes "template" and "id" required.

Template and content are dependent on eachother because we do not know how to
interpret content without a template and we a template with no content to
interpret is useless.

If we have a template and content, then we also need an ID for the message
because we cannot reference the message content except by its ID.

Differential Revision: https://phabricator.services.mozilla.com/D172458
This commit is contained in:
Barret Rennie
2023-03-16 17:50:22 +00:00
parent f5a10f7fa3
commit 3d403fb8c2
4 changed files with 6 additions and 14 deletions

View File

@@ -216,10 +216,6 @@
},
"additionalProperties": true,
"dependentRequired": {
"id": [
"content",
"template"
],
"content": [
"id",
"template"

View File

@@ -103,7 +103,6 @@
},
"additionalProperties": true,
"dependentRequired": {
"id": ["content", "template"],
"content": ["id", "template"],
"template": ["id", "content"]
}

View File

@@ -1370,10 +1370,6 @@
},
"additionalProperties": true,
"dependentRequired": {
"id": [
"content",
"template"
],
"content": [
"id",
"template"