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

Aperta
#186 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
dart

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Dart
Stelle
64
Fork
3
Merge medio
17h 32m
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di btwld/ack

Tutte le issue di btwld/ack

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.