Skip to content

feat(generator): generate models from Draft 2020-12 schemas - #167

Open
leoafarias wants to merge 1 commit into
feat/json-schema-2020-12-runtimefrom
feat/json-schema-model-generator
Open

leoafarias wants to merge 1 commit into
feat/json-schema-2020-12-runtimefrom
feat/json-schema-model-generator

Conversation

@leoafarias

@leoafarias leoafarias commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Status: Ack 2.0 stack (draft). Consolidated into the Ack 2.0 preparation branch (leoafarias/ack-2-0-prep-review).

Summary

  • Add the opt-in ack_generator:ack_json_schema builder for Draft 2020-12 bundles. Representable shapes generate typed @Schemable models; other valid shapes generate schema-validated value models rather than silently dropping assertions.
  • Support offline document assets, explicit format-assertion and model-mode options, stable names for $defs, and JSON-pointer diagnostics for invalid or unsupported sources. All 384 required upstream groups generate offline; a real build_runner consumer exercises representative generated models.
  • Extend the ack_json_schema_builder bridge with assertFormats import, default Draft 2020-12 preservation on toJsonSchemaBuilder(), and toJsonSchemaBuilderDraft7() for legacy Draft-7 lowering.

The Ack runtime importer/exporter and its conformance tests are in PR #171, built on the fixtures merged via #169. This PR contains the generator and bridge integration.

Stack (Ack 2.0)

@leoafarias
leoafarias marked this pull request as ready for review September 28, 2026 02:48
Base automatically changed from fix/copy-with-improvements to main September 28, 2026 03:39
@leoafarias
leoafarias force-pushed the feat/json-schema-model-generator branch from fc279fb to b2f197e Compare September 28, 2026 16:27
@leoafarias leoafarias changed the title feat(generator): generate Ack models from JSON Schema bundles feat(ack): support Draft 2020-12 validation and model generation Sep 28, 2026
@leoafarias
leoafarias changed the base branch from main to test/json-schema-2020-12-fixtures September 28, 2026 22:06
@leoafarias
leoafarias added this pull request to stack #170 September 28, 2026 22:38
Base automatically changed from test/json-schema-2020-12-fixtures to main September 28, 2026 22:58
@leoafarias
leoafarias force-pushed the feat/json-schema-model-generator branch from 1f026b0 to 9d0a3c4 Compare September 28, 2026 23:08
@leoafarias
leoafarias removed this pull request from stack #170 September 28, 2026 23:10
@leoafarias
leoafarias changed the base branch from main to feat/json-schema-2020-12-runtime September 28, 2026 23:11
@leoafarias
leoafarias added this pull request to stack #172 September 28, 2026 23:11
@leoafarias leoafarias changed the title feat(ack): support Draft 2020-12 validation and model generation feat(generator): generate models from Draft 2020-12 schemas Sep 28, 2026
leoafarias added a commit that referenced this pull request Sep 29, 2026
Ack 1.7 excludes the Draft 2020-12 runtime (#171) and JSON Schema model
generator (#167). Restore unreleased changelog headings, 1.6.2 package
versions, and main's dependency bounds so this branch carries no 1.7
release claims. The 2.0 release PR will set final versions.
@leoafarias
leoafarias removed this pull request from stack #172 September 29, 2026 14:10
@leoafarias
leoafarias added this pull request to stack #177 September 29, 2026 14:10
leoafarias added a commit that referenced this pull request Sep 29, 2026
Align the six publishable packages at 1.7.0-beta.1 and move unreleased
notes into the 1.7.0-beta.1 changelog sections. The release includes
shared inference, model adapter schemas, CodecSchema.canEncode, typed
copyWith, stricter constrained-Set validation, the @AckInfer schema
shorthand (#174), generated string-literal escaping (#164), and explicit
schema descriptions (#176). Update PUBLISHING.md for this candidate.

The Draft 2020-12 runtime (#171), JSON Schema-to-Dart generation (#167),
and the decoder error contract (#163) are deferred to 2.0.
@leoafarias
leoafarias marked this pull request as draft September 29, 2026 22:03
@leoafarias leoafarias added the 2.0 Planned for Ack 2.0 label Oct 1, 2026
@leoafarias
leoafarias force-pushed the feat/json-schema-model-generator branch from 7a9fc46 to bff7740 Compare October 9, 2026 17:33
@leoafarias
leoafarias marked this pull request as ready for review October 12, 2026 13:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0 Planned for Ack 2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant