-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
140 lines (140 loc) · 4.04 KB
/
schema.json
File metadata and controls
140 lines (140 loc) · 4.04 KB
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://updates.wenpai.net/schema/plugin-registry-v1.json",
"title": "WenPai Plugin Registry Entry",
"description": "文派插件注册表条目 schema (v1.1.0)",
"type": "object",
"required": [
"slug",
"name",
"type",
"repo",
"main_file"
],
"properties": {
"$schema": {
"type": "string"
},
"slug": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,99}$",
"description": "插件唯一标识符(URL 安全,小写字母+数字+连字符)"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "插件显示名称"
},
"type": {
"type": "string",
"enum": ["plugin", "theme"],
"description": "包类型(当前仅支持 plugin,theme 计划中)"
},
"repo": {
"type": "string",
"pattern": "^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$",
"description": "Forgejo 仓库路径(owner/repo)"
},
"main_file": {
"type": "string",
"pattern": "^[a-z0-9-]+\\.php$",
"description": "插件主文件名(仅 plugin 类型需要)"
},
"description": {
"type": "string",
"maxLength": 500,
"description": "插件简短描述"
},
"homepage": {
"type": "string",
"format": "uri",
"description": "插件主页 URL"
},
"author": {
"type": "string",
"description": "作者名称"
},
"author_uri": {
"type": "string",
"format": "uri",
"description": "作者主页 URL"
},
"license": {
"type": "string",
"description": "许可证标识符(SPDX 格式,如 GPL-2.0-or-later)"
},
"requires_wp": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)*$",
"description": "最低 WordPress 版本"
},
"requires_php": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)*$",
"description": "最低 PHP 版本"
},
"tested_wp": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)*$",
"description": "已测试的最高 WordPress 版本"
},
"tags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"maxItems": 5,
"uniqueItems": true,
"description": "分类标签(最多 5 个)"
},
"icons": {
"type": "object",
"properties": {
"1x": { "type": "string", "format": "uri", "description": "128x128 图标 URL" },
"2x": { "type": "string", "format": "uri", "description": "256x256 高清图标 URL" },
"svg": { "type": "string", "format": "uri", "description": "SVG 矢量图标 URL" }
},
"description": "插件图标 URL(如未指定,云桥将从仓库 .wordpress-org/ 目录自动读取)"
},
"banners": {
"type": "object",
"properties": {
"low": { "type": "string", "format": "uri", "description": "772x250 横幅 URL" },
"high": { "type": "string", "format": "uri", "description": "1544x500 高清横幅 URL" }
},
"description": "插件横幅 URL(如未指定,云桥将从仓库 .wordpress-org/ 目录自动读取)"
},
"screenshots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"src": { "type": "string", "format": "uri", "description": "截图 URL" },
"caption": { "type": "string", "maxLength": 200, "description": "截图说明" }
},
"required": ["src"]
},
"maxItems": 10,
"description": "插件截图列表"
},
"changelog_url": {
"type": "string",
"format": "uri",
"description": "变更日志 URL(指向 CHANGELOG.md 或 Forgejo Releases)"
},
"support_url": {
"type": "string",
"format": "uri",
"description": "支持/问题反馈 URL"
},
"active": {
"type": "boolean",
"default": true,
"description": "是否在更新通道中激活"
}
},
"additionalProperties": false
}