Repository navigation
Ack 2.0: JSON Schema Draft 2020-12 runtime support and model generation #186
Copy link
Copy link
Open
Labels
Description
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.
- feat(ack): support Draft 2020-12 runtime import and export #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 oftoJsonSchema()andtoSchemaModel(). Exercises all 384 required upstream groups against the fixtures merged in test(ack): pin Draft 2020-12 conformance fixtures #169. - feat(generator): generate models from Draft 2020-12 schemas #167, model generation. Adds the opt-in
ack_generator:ack_json_schemabuilder for Draft 2020-12 bundles. Representable shapes generate typed models; other valid shapes generate schema-validated value models. Extends theack_json_schema_builderbridge withassertFormatsimport and preserving export options. Depends on feat(ack): support Draft 2020-12 runtime import and export #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 feat(ack): support Draft 2020-12 runtime import and export #171 with the 2.0 plan for native Draft 2020-12 export and adapter provider profiles, as its description calls out.
- Rebase feat(ack): support Draft 2020-12 runtime import and export #171 onto
main, then feat(generator): generate models from Draft 2020-12 schemas #167 onto feat(ack): support Draft 2020-12 runtime import and export #171. - Align feat(generator): generate models from Draft 2020-12 schemas #167's generated models with the annotation and model form that feat(ack)!: unify annotations and support primary constructors #184 settles. feat(generator): generate models from Draft 2020-12 schemas #167 generates
@AckInfermodels; feat(ack)!: unify annotations and support primary constructors #184 introduces@Schemableas the single annotation, with primary constructors, and keeps@AckInferonly as a deprecated spelling. - Decide how generated models expose their schema (
Model.schema, Generator: add aModel.schemashorthand forModel.$ack.modelSchema#173) and how custom types resolve (Generator: resolve a field's type from the type's own schema, and retire @AckField(schema:) #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
- test(ack): pin Draft 2020-12 conformance fixtures #169: the Draft 2020-12 fixtures both pull requests test against.
- feat(ack)!: unify annotations and support primary constructors #184:
@Schemablewith primary constructors. - Generator: add a
Model.schemashorthand forModel.$ack.modelSchema#173, Generator: resolve a field's type from the type's own schema, and retire @AckField(schema:) #185: schema exposure and type-owned schemas.
Reactions are currently unavailable
Activity