Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`fromJsonSchemaDocument`: import `dependentRequired` (draft-07 `dependencies`)

Đang mở
#10,046 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@effect-bot đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #10072 của @effect-bot — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

What is the problem this feature would solve?

On 4.0.7, importing a draft-07 schema that uses dependencies with a property list fails, after fromSchemaDraft07 rewrites it to dependentRequired:

SchemaRepresentation.fromJsonSchemaDocument(JsonSchema.fromSchemaDraft07({
  type: "object",
  properties: { a: { type: "string" }, b: { type: "string" } },
  dependencies: { a: ["b"] }
}))
// Cannot import JSON Schema keyword "dependentRequired": Effect has no equivalent constraint.

github-workflow.json uses it once.

Context: validating .github/dependabot.yaml and GitHub workflow files with SchemaRepresentation.fromJsonSchemaDocument against the SchemaStore documents dependabot-2.0.json and github-workflow.json, to replace ajv. Since #7410 the importer rejects keywords it cannot represent, which is the right failure, but it means both real-world documents cannot be imported at all. This is one of five gaps found in those two documents; each is filed separately.

What is the feature you are proposing to solve the problem?

Import dependentRequired as a check: when a listed property is present, the properties it names must be too. dependentSchemas could follow the same route as if/then.

What alternatives have you considered?
  • Stripping the keyword: imports, but no longer requires the dependent properties.
  • Keeping ajv for these documents: what we do today.
Ngôn ngữ chính
TypeScript
Star
16.7k
Fork
808
Merge trung bình
10 giờ 17 phút
Pull request đã merge (30 ngày)
850

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Effect-TS/effect

Tất cả issue của Effect-TS/effect

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.