Skip to content

🔧 Good First Issue: Add input validation to ZWF-20 JSON Schema #3

Description

@ZWISERFIT

难度: 初级 | 时间: ~1-2小时 | 需要: 基础 JSON Schema 知识

任务

standards/ZWF20-Behavior-Data-Standard-v1.0.md 中有 JSON Schema 示例,但缺少 patternenum 等验证规则。完善它。

步骤

  1. standards/ZWF20-Behavior-Data-Standard-v1.0.md 中的 Schema 部分
  2. 为关键字段添加验证规则:
    • member_did — 正则 ^did:zwf:0x[a-f0-9]+$
    • event_type — enum 限制已知事件类型
    • timestamp — minimum/maximum 合理范围
  3. 提交 PR,附带一个含有意错误数据的测试文件证明验证能捕捉到

参考

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions