{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://schemas.edu-industry.cn/package-manifest/1.2.0/schema.json", "title": "PACKAGE-MANIFEST V1.2 数据交付包清单", "description": "数据导入、导出和租户交付使用的版本、范围、文件、质量与血缘清单。", "type": "object", "additionalProperties": false, "required": [ "manifest_version", "package_id", "data_product", "data_version", "contract_name", "contract_version", "data_as_of", "tenant_scope", "record_count", "quality_score", "lineage_snapshot", "files", "generated_at", "generated_by" ], "properties": { "manifest_version": { "type": "string", "const": "1.2.0" }, "package_id": { "type": "string", "pattern": "^EDU-PKG-[0-9]{8}-[A-Z0-9]{2,24}$", "description": "数据交付包唯一编号。" }, "release_id": { "type": "string", "pattern": "^REL-[0-9]{8}-[A-Z0-9-]{2,32}$", "description": "生成此 Manifest 的发布候选编号。" }, "release_status": { "type": "string", "enum": ["DRAFT", "PENDING_APPROVAL", "APPROVED", "REJECTED", "PUBLISHED", "ROLLED_BACK"], "description": "Manifest 生成时的候选或发布状态。" }, "data_product": { "type": "string", "minLength": 1, "maxLength": 200, "description": "平台数据产品名称或代码。" }, "data_version": { "type": "string", "minLength": 1, "maxLength": 128, "description": "业务数据版本。" }, "contract_name": { "type": "string", "pattern": "^[A-Z][A-Z0-9-]{2,63}$", "description": "绑定的数据契约名称。" }, "contract_version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$", "description": "精确的数据契约版本。" }, "data_as_of": { "type": "string", "format": "date", "description": "交付数据业务截止日期。" }, "tenant_scope": { "type": "array", "minItems": 1, "maxItems": 10000, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 }, "description": "允许接收此交付包的租户或数据范围代码。" }, "output_format": { "type": ["string", "null"], "enum": ["parquet", "csv_utf8", "jsonl", "xlsx", null], "description": "主数据文件格式。" }, "record_count": { "type": "integer", "minimum": 0, "description": "有效业务记录总数。" }, "quality_score": { "type": "number", "minimum": 0, "maximum": 100, "description": "与质量报告一致的综合质量评分。" }, "quality_report_path": { "type": ["string", "null"], "maxLength": 1024, "description": "质量报告在交付包中的相对路径。" }, "lineage_snapshot": { "type": "string", "pattern": "^LINEAGE-[A-Z0-9-]{8,96}$", "description": "数据血缘快照编号。" }, "previous_stable_version": { "type": ["string", "null"], "maxLength": 128, "description": "上一稳定版本,用于回滚和版本对比。" }, "files": { "type": "array", "minItems": 1, "maxItems": 10000, "items": { "$ref": "#/$defs/file" }, "description": "交付包内全部文件和校验信息。" }, "generated_at": { "type": "string", "format": "date-time", "description": "交付包生成时间。" }, "generated_by": { "type": "string", "minLength": 1, "maxLength": 128, "description": "生成任务、服务账号或操作人。" }, "approval_reference": { "type": ["string", "null"], "maxLength": 256, "description": "生产发布审批记录编号。" }, "notes": { "type": ["string", "null"], "maxLength": 4000, "description": "交付说明、限制和已知问题。" } }, "$defs": { "file": { "type": "object", "additionalProperties": false, "required": ["path", "media_type", "bytes", "sha256"], "properties": { "path": { "type": "string", "pattern": "^(?!/)(?!.*\\.\\.).+$", "maxLength": 1024, "description": "包内相对路径,不允许绝对路径和父目录穿越。" }, "media_type": { "type": "string", "maxLength": 128, "description": "IANA 媒体类型。" }, "bytes": { "type": "integer", "minimum": 0, "description": "文件字节数。" }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$", "description": "文件 SHA-256 完整值。" }, "record_count": { "type": ["integer", "null"], "minimum": 0, "description": "数据文件的记录数。" }, "compression": { "type": ["string", "null"], "enum": ["none", "gzip", "zstd", "zip", null], "description": "文件压缩方式。" } } } } }