From 4a4d0ca993515f691d013c316a1a6858516ef3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B9=E6=96=AD=E6=A1=A5=E7=83=9F=E9=9B=A8=E3=83=9F?= Date: Sun, 20 Dec 2020 13:42:08 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=20IntelliJ=20IDEA=20=E7=9A=84=20JSON=20Schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方便用户在 IDE 内绑定模板,快速编写 imports.yml 文件 Signed-off-by: べ断桥烟雨ミ --- projects/import.schema.json | 85 +++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 projects/import.schema.json diff --git a/projects/import.schema.json b/projects/import.schema.json new file mode 100644 index 000000000..2b9fef446 --- /dev/null +++ b/projects/import.schema.json @@ -0,0 +1,85 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$comment": "https://codechina.csdn.net/codechina/mirrors-settings/-/wikis/home#%E5%90%8C%E6%AD%A5%E9%A1%B9%E7%9B%AE%E9%85%8D%E7%BD%AE", + "required": [ + "group" + ], + "properties": { + "group": { + "uniqueItems": true, + "type": "object", + "description": "需要 Mirror 项目在 GitHub 项目中的 Namespace(支持组织或个人的项目)", + "required": [ + "name", + "description", + "projects" + ], + "properties": { + "name": { + "uniqueItems": true, + "type": "string", + "description": "项目所属的 Namespace (个人或组织)名称", + "examples": [ + "alibaba" + ] + }, + "description": { + "type": "string", + "description": "组织/个人的简介,可以为空,填写后会被作为 Mirrors 下对应子组织的组织简介" + }, + "projects": { + "type": "array", + "description": "需要添加的项目", + "minItems": 1, + "items": { + "$id": "#/properties/group/projects", + "anyOf": [ + { + "$id": "#/properties/group/projects/anyOf/0", + "type": "object", + "required": [ + "name", + "description", + "mirrorRelease", + "topic" + ], + "examples": [ + { + "name": "p3c", + "description": "", + "mirrorRelease": false, + "topic": "" + } + ], + "properties": { + "name": { + "type": "string", + "description": "需要导入的项目完整名称", + "minLength": 1, + "examples": [ + "p3c" + ] + }, + "description": { + "type": "string", + "description": "项目的简介,可以为空,填写后会被作为同步后项目的项目简介" + }, + "mirrorRelease": { + "type": "boolean", + "description": "是否需要同步 mirror 项目的 Release 附件,默认为 false(功能开发中……)", + "default": false + }, + "topic": { + "type": "string", + "description": "项目的话题,可以为空,如果是多个则请用英文逗号 , 分割开,填写后会被作为同步后项目的 Topic 信息显示在项目主页中" + } + } + } + ] + } + } + } + } + }, + "additionalProperties": false +} -- GitLab