Skip to content

ref(http): 从实际 Relation 响应派生公开契约 - #5

Closed
xiaoland wants to merge 1 commit into
fix/openapi-patch-contractfrom
ref/http-typed-relation-responses
Closed

xiaoland wants to merge 1 commit into
fix/openapi-patch-contractfrom
ref/http-typed-relation-responses

Conversation

@xiaoland

@xiaoland xiaoland commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

改动

  • 将本 Peer 的 Relation、包含 Relation 的图和带类型标签的实体响应作为 Rust 类型序列化。公开 Relation Schema 从同一类型派生。
  • 保留 REST DTO 的字段名与可空关系、旧版路由字段、委派实体的额外字段及 CLI 入口。
  • 沿用已有 HTTP/CLI 验证技能,加入实际响应与派生 Schema 的对照方法。

验证

  • 基点在独立 PostgreSQL 中记录 31 组真实 HTTP 响应,覆盖数据库 NULL、旧版路由及由第二个 loopback Peer 提供的委派实体;既有验收旅程与真实 CLI 读写通过。
  • 候选本机构建、独占 PostgreSQL、真实 CLI Schema 发现、更新和读回全部通过。31 组 HTTP 响应规范化后与基点一致,97 个 OpenAPI 输入操作和 由 Rust HTTP 更新类型生成 PATCH 契约 #1 相同。10 个实际响应通过实时 Schema,3 个故意构造的错误被拒绝。既有验收脚本和 Linux 静态 CI 也通过。
  • 本草稿以 由 Rust HTTP 更新类型生成 PATCH 契约 #1 的分支为基点。两者评审后分别合并,或先确认 由 Rust HTTP 更新类型生成 PATCH 契约 #1 的兼容范围再调整基点。

@xiaoland xiaoland closed this Nov 28, 2026
@xiaoland
xiaoland deleted the ref/http-typed-relation-responses branch November 28, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant