summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/schema/search-default-override-allowlist-schema.json
blob: 6e48745832c0b2d5f48a428212d4fc260483da67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  "type": "object",
  "required": ["thirdPartyId", "overridesId", "urls"],
  "properties": {
    "thirdPartyId": {
      "type": "string",
      "title": "Third-party Add-on Id",
      "description": "The identifier of the third party add-on which will override the app provided one. Should be of the format example@foo. If the third party engine is an OpenSearch engine, then this must be opensearch@search.mozilla.org",
      "pattern": "^[a-zA-Z0-9-._]*@[a-zA-Z0-9-._]*$"
    },
    "overridesId": {
      "type": "string",
      "title": "Add-on Id to Override",
      "description": "The identifier of the app-provided add-on to be overridden. Should be of the format example@search.mozilla.org",
      "pattern": "^[a-zA-Z0-9-._]*@search.mozilla.org$"
    },
    "engineName": {
      "type": "string",
      "title": "Engine Name",
      "description": "The name of the search engine to be overridden, only applies to OpenSearch engines"
    },
    "urls": {
      "type": "array",
      "title": "URLs",
      "description": "An array of URL sets which must be matched (with the add-on's manifest settings) to allow the override",
      "items": {
        "type": "object",
        "required": ["search_url"],
        "properties": {
          "search_url": {
            "type": "string",
            "title": "search_url",
            "description": "The main search url"
          },
          "search_url_get_params": {
            "type": "string",
            "title": "search_url_get_params",
            "description": "Any get parameters"
          },
          "search_url_post_params": {
            "type": "string",
            "title": "search_url_post_params",
            "description": "Any post parameters"
          },
          "search_form": {
            "type": "string",
            "title": "search_form",
            "description": "The search form url"
          }
        }
      }
    }
  }
}