和顺 / 衡律 返回所属 Agent
22.5

命令、查询与事件

原能力

统一命令、查询、事件和回执封套,固定版本、幂等与并发冲突处理。(合同附件 R7 22.5)

首选项目

python-jsonschema(MIT)。 python-jsonschema

匹配范围

消息结构与生命周期事件可组成接口模型。

源码

python-jsonschema · def iter_errors(self, instance

jsonschema/validators.py · 352–365 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
        def iter_errors(self, instance, _schema=None):
            if _schema is not None:
                warnings.warn(
                    (
                        "Passing a schema to Validator.iter_errors "
                        "is deprecated and will be removed in a future "
                        "release. Call validator.evolve(schema=new_schema)."
                        "iter_errors(...) instead."
                    ),
                    DeprecationWarning,
                    stacklevel=2,
                )
                validators = [
                    (self.VALIDATORS[k], k, v)

实现与验收要点

命令、查询、事件的独立语义、响应及权限。