Skip to content

fix(ack): accept Draft-07 $schema URI and remove dead prefixItems index - #217

Merged
leoafarias merged 1 commit into
leoafarias/json-schema-import-builtin-formatsfrom
leoafarias/json-schema-import-draft07-uri
Oct 9, 2026
Merged

leoafarias merged 1 commit into
leoafarias/json-schema-import-builtin-formatsfrom
leoafarias/json-schema-import-draft07-uri

Conversation

@leoafarias

@leoafarias leoafarias commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Stacked on #216 (leoafarias/json-schema-import-builtin-formats).

_JsonSchemaCompiler in 1.7.x already supports Draft-07 definitions alongside Draft 2020-12 $defs (and schema.toJsonSchema() emits Draft-07 shapes), but _JsonSchemaCompiler._index rejected documents that explicitly declared the Draft-07 $schema URI (http(s)://json-schema.org/draft-07/schema(#)) with unsupported_dialect. In addition, listKeywords in _JsonSchemaCompiler still contained an unused 'prefixItems' entry even though prefixItems validation is deferred to 2.0 (#171).

Scope

  • Accepts http(s)://json-schema.org/draft-07/schema(#) alongside https://json-schema.org/draft/2020-12/schema(#) in _JsonSchemaCompiler.supportedSchemaDialects so Draft-07 schemas using Ack's supported subset import cleanly without stripping $schema.
  • Removes the dead 'prefixItems' entry from _JsonSchemaCompiler.listKeywords so prefixItems fails directly with unsupported_keyword without being indexed as a child schema list.
  • Updates docs/guides/json-schema-integration.mdx and packages/ack/CHANGELOG.md (## Unreleased).

Verification

  • fvm dart analyze in packages/ack reports no issues.
  • fvm dart test test/json_schema_import_test.dart test/json_schema_import_api_test.dart test/json_schema_import_conformance_test.dart passes.

@leoafarias
leoafarias force-pushed the leoafarias/json-schema-import-draft07-uri branch from 385d3c2 to 5b64f3c Compare October 8, 2026 22:01
@leoafarias
leoafarias force-pushed the leoafarias/json-schema-import-draft07-uri branch 2 times, most recently from f56b1a8 to c1cafb9 Compare October 9, 2026 02:26
@leoafarias
leoafarias added this pull request to stack #218 October 9, 2026 12:33
@leoafarias
leoafarias force-pushed the leoafarias/json-schema-import-draft07-uri branch from c1cafb9 to dbaa948 Compare October 9, 2026 12:46
@leoafarias
leoafarias force-pushed the leoafarias/json-schema-import-draft07-uri branch from dbaa948 to ac0b4ba Compare October 9, 2026 13:10
@leoafarias
leoafarias force-pushed the leoafarias/json-schema-import-draft07-uri branch from ac0b4ba to fee90fc Compare October 9, 2026 13:29
@leoafarias
leoafarias merged commit 321f4ff into main Oct 9, 2026
11 checks passed
@leoafarias
leoafarias deleted the leoafarias/json-schema-import-draft07-uri branch October 9, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant