summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/schema/search-config-overrides-v2-schema.json
blob: 1fcb8e9cc0b54283e28d779a53260cbdbf51449c (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
  "title": "Search Engine Overrides Schema",
  "description": "This schema contains the details for overriding application provided search engines defined in search-config-v2. The associated remote settings collection is search-config-overrides-v2.",
  "definitions": {
    "partnerCode": {
      "title": "Partner Code",
      "description": "The partner code for the engine or variant. This will be inserted into parameters which include '{partnerCode}'",
      "type": "string",
      "pattern": "^[a-zA-Z0-9-_]*$"
    },
    "urls": {
      "title": "URLs",
      "description": "The URLs associated with the search engine.",
      "type": "object",
      "properties": {
        "search": {
          "title": "Search URL",
          "description": "The URL to use for searches",
          "$ref": "#/definitions/url"
        }
      }
    },
    "url": {
      "type": "object",
      "properties": {
        "base": {
          "title": "Base",
          "description": "The PrePath and FilePath of the URL. May include variables for engines which have a variable FilePath, e.g. {searchTerm} for when a search term is within the path of the url.",
          "type": "string"
        },
        "params": {
          "title": "Parameters",
          "description": "The parameters for this URL.",
          "type": "array",
          "items": {
            "type": "object",
            "title": "Parameter",
            "properties": {
              "name": {
                "title": "Name",
                "description": "The parameter name",
                "type": "string",
                "pattern": "^[a-zA-Z0-9-_]*$"
              },
              "value": {
                "title": "Value",
                "description": "The parameter value, this may be a static value, or additionally contain a parameter replacement, e.g. {inputEncoding}. For the partner code parameter, this field should be {pc}.",
                "type": "string",
                "pattern": "^[a-zA-Z0-9-_{}]*$"
              }
            },
            "required": ["name", "value"]
          }
        }
      }
    }
  },
  "type": "object",
  "required": ["identifier", "partnerCode", "clickUrl", "urls"],
  "properties": {
    "identifier": {
      "title": "Identifier",
      "description": "This is the identifier of the search engine in search-config-v2 that this record will override. It may be extended by telemetrySuffix.",
      "type": "string",
      "pattern": "^[a-zA-Z0-9-_]*$"
    },
    "partnerCode": {
      "$ref": "#/definitions/partnerCode"
    },
    "telemetrySuffix": {
      "title": "Telemetry Suffix",
      "description": "Suffix that is appended to the search engine identifier following a dash, i.e. `<identifier>-<suffix>`. There should always be a suffix supplied if the partner code is different.",
      "type": "string",
      "pattern": "^[a-zA-Z0-9-]*$"
    },
    "clickUrl": {
      "type": "string",
      "format": "uri",
      "description": "The url used to for reporting clicks."
    },
    "urls": {
      "$ref": "#/definitions/urls"
    }
  }
}