Conversation
Fixes: sourcemeta/jsonschema#619 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
There was a problem hiding this comment.
1 issue found across 15 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/e2e/typescript/2020-12/allof_intersection/schema.json">
<violation number="1" location="test/e2e/typescript/2020-12/allof_intersection/schema.json:10">
P2: These closed `allOf` branches make the schema unsatisfiable; the fixture never admits an object with both `name` and `age`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| @@ -0,0 +1,21 @@ | |||
| { | |||
There was a problem hiding this comment.
P2: These closed allOf branches make the schema unsatisfiable; the fixture never admits an object with both name and age.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/e2e/typescript/2020-12/allof_intersection/schema.json, line 10:
<comment>These closed `allOf` branches make the schema unsatisfiable; the fixture never admits an object with both `name` and `age`.</comment>
<file context>
@@ -0,0 +1,21 @@
+ "name": { "type": "string" }
+ },
+ "required": [ "name" ],
+ "additionalProperties": false
+ },
+ {
</file context>
🤖 Augment PR SummarySummary: This PR completes support for the JSON Schema (2020-12) Changes:
Technical Notes: The TypeScript expected outputs demonstrate that 🤖 Was this summary useful? React with 👍 or 👎 |
| "name": { "type": "string" } | ||
| }, | ||
| "required": [ "name" ], | ||
| "additionalProperties": false |
There was a problem hiding this comment.
additionalProperties: false inside each allOf subschema makes objects containing both name and age invalid under JSON Schema semantics (each branch rejects the other branch’s property), so the “valid” instances in the TypeScript tests wouldn’t validate at runtime.
Severity: medium
Other Locations
test/e2e/typescript/2020-12/allof_intersection/schema.json:18test/e2e/typescript/2020-12/allof_refs/schema.json:10test/e2e/typescript/2020-12/allof_refs/schema.json:18
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| using namespace sourcemeta::codegen; | ||
|
|
||
| ASSERT_EQ(result.size(), 7); | ||
| EXPECT_IR_INTERSECTION(result, 6, "", 2); |
There was a problem hiding this comment.
This test hard-codes the intersection node at index 6 (and size 7), which can become brittle if the IR gains additional entries or the sort order changes; using a relative index like other tests would make it less sensitive to unrelated IR changes.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Fixes: sourcemeta/jsonschema#619
Signed-off-by: Juan Cruz Viotti jv@jviotti.com