summaryrefslogtreecommitdiffstats
path: root/chrome/common/web_app_schema.json
blob: fe239667382b2c3266dad9ccfb7e585e1cd15799 (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
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file contains the schema for web app defintion files.

{
  "type": "object",
  "properties": {
    // TODO(aa): Need to figure out what max length the store is using for name
    // and description.
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 45
    },
    "description": {
      "type": "string",
      "maxLength": 132,
      "optional": true
    },
    "launch_url": {
      "type": "string",
      "minLength": 1
    },
    "launch_container": {
      "enum": ["tab", "panel"],
      "optional": true
    },
    // TODO(aa): We had problems with a simple array of strings in extensions.
    // Consider something else.
    "permissions": {
      "type": "array",
      "optional": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "urls": {
      "type": "array",
      "optional": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "icons": {
      "type": "object",
      "optional": true,
      "properties": {
        "16": { "optional": true, "type": "string", "minLength": 1 },
        "48": { "optional": true, "type": "string", "minLength": 1 },
        "128": { "optional": true, "type": "string", "minLength": 1 }
      }
    }
  }
}