forked from w3c/miniapp-manifest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest_schema.json
207 lines (206 loc) · 6.4 KB
/
manifest_schema.json
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
{
"$id": "http://www.w3.org/schema_miniapp_manifest-v1_0_0.json",
"title": "MiniApp Manifest JSON Schema",
"$schema ": "http://json-schema.org/draft-07/schema#",
"description": "JSON Schema for the valiation of MiniApp Manifest document",
"definitions": {
"TypeVersionString": {
"type": "string",
"example": "1.0.0"
},
"TypePathString": {
"type": "string",
"format": "uri-reference"
}
},
"type": "object",
"required": [
"app_id",
"name",
"icons",
"version_name",
"version_code",
"min_platform_version",
"pages"
],
"properties": {
"dir": {
"description": "The base direction of the manifest.",
"type": "string",
"enum": [ "ltr", "rtl", "auto" ],
"default": "auto"
},
"icons": {
"description": "An array of icon objects that can serve as iconic representations of MiniApps.",
"type": "array",
"items": {
"type": "object",
"required": ["src"],
"properties": {
"sizes": {
"description": "A string consisting of an unordered set of unique space-separated tokens which are ASCII case-insensitive that represents the dimensions of an image for visual media.",
"oneOf": [
{
"type": "string",
"pattern": "^[0-9 x]+$"
},
{
"enum": [ "any" ]
}
]
},
"src": {
"description": "An image is a URL from which a user agent can fetch the icon's data.",
"$ref": "#/definitions/TypePathString"
},
"label": {
"description": "The alternative textual descripion of the icon.",
"type": "string"
}
}
}
},
"lang": {
"type": "string",
"description": "The value of lang here takes the value of Language-Tag defined in the [BCP47]."
},
"name": {
"description": "The name of the MiniApp.",
"type": "string"
},
"short_name": {
"description": "A short version of the name of the MiniApp.",
"type": "string"
},
"description": {
"description": "A textual description for the MiniApp representing the purpose of the web application in natural language.",
"type": "string"
},
"app_id": {
"type": "string",
"description": "A string that identifies the MiniApp univocally.",
"example": "org.example.miniapp"
},
"version_name": {
"description": "A string that identifies the version of a MiniApp in a user-friendly way.",
"type": "string",
"example": "1.0.0"
},
"version_code": {
"description": "A non-negative integer that identifies the version of a MiniApp.",
"type": "integer",
"default": 1,
"min": 1
},
"min_platform_version": {
"$ref": "#/definitions/TypeVersionString",
"description": "A string with the minimum supported version of the required platform that can ensure normal operation of MiniApp.",
"example": "1.0.0"
},
"pages": {
"type": "array",
"items": {
"$ref": "#/definitions/TypePathString"
},
"description": "An array of path strings used for specifying which pages are included in MiniApp. Each item in the array represents a page route."
},
"req_permissions": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"reason": {
"type": "string"
}
}
}
},
"widgets": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "path"],
"properties": {
"name": {
"type": "string"
},
"path": {
"$ref": "#/definitions/TypePathString"
},
"min_platform_version": {
"$ref": "#/definitions/TypeVersionString",
"description": "If not set, it's identical to the MiniApp platform version by default."
}
}
}
},
"window": {
"type": "object",
"properties": {
"auto_design_width": {
"description": "Enables/disables auto-calculation of page's design_width",
"type": "boolean",
"default": false
},
"background_color": {
"description": "String with the Window background color represented in sRGB format.",
"default": "#ffffff"
},
"background_text_style": {
"description": "Background text style (dark or light).",
"enum": ["dark", "light"],
"default": "dark"
},
"design_width": {
"description": "A non-negative integer specifying the width of the baseline page design (in pixels).",
"type": "integer",
"default": 750,
"min": 0
},
"enable_pull_down_refresh": {
"description": "Enables/disables the pull-to-refresh event.",
"type": "boolean",
"default": false
},
"fullscreen": {
"description": "Enables/disables the full screen display.",
"type": "boolean",
"default": false
},
"navigation_bar_background_color": {
"description": "Navigation bar background color in sRGB format",
"default": "#000000"
},
"navigation_bar_text_style": {
"description": "Text style of the navigation bar (white or black).",
"enum": ["white", "black"],
"default": "white"
},
"navigation_bar_title_text": {
"description": "String with the title of the navigation bar.",
"type": "string"
},
"navigation_style": {
"description": "String with the style of the navigation bar.",
"enum": ["default", "custom"],
"default": "default"
},
"on_reach_bottom_distance": {
"description": "Integer that indicates the distance for pull-up bottom event triggering (in pixels).",
"type": "integer",
"default": 50,
"min": 0
},
"orientation": {
"description": "String that indicates the screen orientation configuration (portrait, landscape).",
"enum": ["portrait", "landscape"],
"default": "portrait"
}
}
}
}
}