`fromJsonSchemaDocument`: import `if` / `then` / `else`
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
What is the problem this feature would solve?
On 4.0.7, importing a schema that uses if/then/else fails:
SchemaRepresentation.fromJsonSchemaDocument(JsonSchema.fromSchemaDraft07({
type: "object",
properties: { kind: { type: "string" }, size: { type: "number" } },
if: { properties: { kind: { const: "box" } } },
then: { required: ["size"] }
}))
// Cannot import JSON Schema keyword "if": Effect has no equivalent constraint.
dependabot-2.0.json uses if 5 times, for rules that depend on package-ecosystem, and github-workflow.json 8 times.
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 if/then/else as a check: when the value decodes against if, it must also satisfy then, otherwise else. Missing then or else means no constraint on that side, as in the specification.
What alternatives have you considered?
- Stripping the keywords with
onEnter: imports, but drops the conditional rules, so invalid files pass. - Keeping
ajvfor these documents: what we do today.
- 主要言語
- TypeScript
- スター
- 16.7k
- フォーク
- 808
- 平均マージ
- 11時間 11分
- マージ済み PR(30日)
- 840
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Effect-TS/effect のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
@effect/ai-anthropic: text_editor_20250728 insert decodes `new_str`, but the API sends `insert_text`オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
[email protected]: crypto/KeyFormat declarations require the global JsonWebKey, breaking Node-only type-checks対応中かも @effect-bot が今日担当しました。 オープン
Effect-TS/effect#10115 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
sql-pg: send several statements in one extended-query Sync (transaction-local context without extra round trips)対応中かも @effect-bot が今日担当しました。 オープン
Effect-TS/effect#10113 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Effect-TS/effect の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
area:plugins area:security area:skills bug has repro
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
anthropics/claude-code#105911 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
dev-five-git/devup-ui#879 ·
メンテナーはふだん 11 日以内に返信
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Fission-AI/OpenSpec#2165 ·
メンテナーはふだん 1 日以内に返信
-
🐞 bug 🧐 unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Tencent/tdesign-vue-next#7032 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信