diff --git a/projects/import.schema.json b/projects/import.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..2b9fef446773a64832da787a921b5f21cf930bca --- /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 +}