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

Out-of-order schemas

Open
#941 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I had an issue raised where someone put $defs at the beginning of their schema, and my solution didn't handle it properly.

In particular, my implementation failed to set the dialect from $schema before building the subschemas in the $defs, which meant they were built using the default dialect.

We should have some tests that ensure $schema is respected regardless of where it appears lexigraphically in the schema. (Of course, it needs to be at the root.)

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 reading the linked issue 1044 and locating the existing schema fixtures or tests covering $schema and $defs. Add cases showing that a root-level $schema is respected even when $defs appears earlier lexicographically, then run the relevant test-suite checks to confirm both schema orders behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.