json-schema-org / json-schema-org/JSON-Schema-Test-Suite

test needed to show that transclusion of $ref into allOf changes the evaluation outcome

Open
#444 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

missing test
Dominant language
Python
Stars
750
Forks
307
Avg merge
3d 17h
Merged PRs (30d)
24

Description

see https://json-schema.slack.com/archives/CT7FF623C/p1603727881177900?thread_ts=1603504778.173300&cid=CT7FF623C

Basically, we need a test to show that changing this:

{
  "$ref": "some subschema that generates annotations",
  "unevaluatedProperties": { ... },
}

to this:

{
  "allOf": [
    < that same subschema that generates annotations, included directly here... >,
    "unevaluatedProperties": { ... }
  ],
 
}

...does not always yield the same result, sibling keywords in a subschema can see annotations produced by earlier-evaluating siblings, but subchemas under allOf siblings cannot see each other's annotation results.

Therefore, this is not a reliable mechanism of transcluding/bundling referenced subschemas into the same schema.

cc @Relequestual

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the repository's existing tests for $ref, allOf, annotations, and unevaluatedProperties, then consult the linked Slack discussion for the intended cases. Add a regression test demonstrating that the two schema forms can produce different evaluation outcomes.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.