Ack 2.0: JSON Schema Draft 2020-12 runtime support and model generation

Open
#186 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
dart

Research direction

Start by reading draft PRs #171 and #167 alongside the 2.0 plan and related issues #184, #173, and #185; no single implementation entry point is specified. Done means the 2.0 structure and model API decisions are settled, the stacked PRs are rebased and aligned, and their required tests and release changes are ready for merging.

Written by the indexing model from the issue text.

Description

2.0 enhancement

Tracking issue for JSON Schema Draft 2020-12 support, deferred from Ack 1.7 to 2.0.

The work

Two draft pull requests, stacked: main ← #171 ← #167.

  • #171, runtime import and export. Extends Ack.fromJsonSchema() to the complete required Draft 2020-12 validation suite (dynamic references, unevaluated keywords, supplied dialects, offline meta-schemas, opt-in format assertions). Adds resource-preserving export and model APIs while keeping the 1.x Draft-7 output of toJsonSchema() and toSchemaModel(). Exercises all 384 required upstream groups against the fixtures merged in #169.
  • #167, model generation. Adds the opt-in ack_generator:ack_json_schema builder for Draft 2020-12 bundles. Representable shapes generate typed models; other valid shapes generate schema-validated value models. Extends the ack_json_schema_builder bridge with assertFormats import and preserving export options. Depends on #171.

Status

Both are parked as drafts and marked "do not merge yet". Neither is rebased onto the 1.7.0-beta.2 main, by intent, until the 2.0 structure is decided. #171 currently conflicts with main.

Before these can merge

  • Reconcile #171 with the 2.0 plan for native Draft 2020-12 export and adapter provider profiles, as its description calls out.
  • Rebase #171 onto main, then #167 onto #171.
  • Align #167's generated models with the annotation and model form that #184 settles. #167 generates @AckInfer models; #184 introduces @Schemable as the single annotation, with primary constructors, and keeps @AckInfer only as a deprecated spelling.
  • Decide how generated models expose their schema (Model.schema, #173) and how custom types resolve (#185), since the generator output depends on both.
  • Set final package versions and changelog entries in the 2.0 release pull request, not in these.

Out of scope

Optional vocabularies other than format assertions are not claimed as complete in #171.

Related

  • #169: the Draft 2020-12 fixtures both pull requests test against.
  • #184: @Schemable with primary constructors.
  • #173, #185: schema exposure and type-owned schemas.
Dominant language
Dart
Stars
64
Forks
3
Avg merge
17h 32m
Merged PRs (30d)
33

Getting set up

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.

More from btwld/ack

All issues in btwld/ack

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.