Repository navigation
docs: prepare 2.0 documentation and pin naming conventions - #281
Merged
Merged
Conversation
Add a VM test that scans the library source and requires built-in constraint keys and diagnostic codes to be lowercase snake_case, and serialized error map fields to be camelCase. Record the naming rule in ARCHITECTURE.md and keep the source-reading test out of the Chrome run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
leoafarias
marked this pull request as draft
December 2, 2026 14:57
Give each topic one home: Schema Types owns presence and defaults, Custom Validation owns refine, transform, constraints and messages, and Error Handling owns the error model. Trim the overview, installation, quickstart and READMEs, add a generated-model step to the quickstart, reorganize the migration guide by starting version, and turn Configuration into a hub page. Replace beta-history prose with 2.0 behavior. Version pins stay for the release step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Add a rules index, naming and reserved-name tables, inferred field types, rule annotation and JSON key sections, and the facade schema rules to Model Code Generation. Reorder Codecs. Shorten the JSON Schema guide's lead, add native-versus-imported differences and the missing constraint-to-keyword rows, and turn shape notes into a table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Make the Flutter form guide a numbered how-to with one validator helper. Reduce Common Recipes to a link table and the API-response recipe, and Ecosystem Integrations to a choose-an-adapter table. Fold the adapter quickstart into the full adapter guide and drop it from the sidebar. Rewrite the API reference as one entry per symbol that links to pub.dev dartdoc. Give the three adapter READMEs one structure and move the Firebase contributor tests to test/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Document SchemaError and each subclass, Constraint, ConstraintError, Validator, JsonSchemaSpec and AckException.errors. Give parseAs and safeParseAs distinct summaries, contrast nullable with optional, start boolean getters with "Whether", and add short examples to Ack.discriminated and the object shape operations. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Add the missing 1.x runtime breaks, Set and naming rules to the agent skills. Restore the .schema.json numeric note, the inference API and the preserveBoundary rule. Fix anchors that moved, point doc-integrity checks at the pages that now own each example, and drop snippet wrappers that no example uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
leoafarias
marked this pull request as ready for review
December 2, 2026 15:07
Pairs with the generator fix that makes XSchema.toJsonSchema() and toSchemaModel() export X.schema, so a class-owned description and exportable constraints appear in the export. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
This was referenced Dec 2, 2026
Restore the ACK_FIREBASE_AI_* variable names in the Firebase test guide. Make the naming test read both quote styles, conditional and inline map keys, the AckException envelope, and fail on any computed key or code. Qualify user-facing error text, the jsonEncode shortcut, which built-ins take message:, callback failure types, JsonSchemaSpec export, and the isNullable/isOptional flags. Document anyOf fields versus roots, the generator part step, validated .schema.json output, and form-level refinement errors. Fix error subtype examples, the naming skill, and restore the compiled factory example and doc-test coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b677e598f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The replacement submit handler skipped _formKey.currentState!.validate(), so untouched invalid fields never showed their errors. Run the field validators first and send only when they and safeParse both pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Qualify the toString redaction promise in the migration guide, the AckException and toString dartdoc, and the migration skill. Describe isNullable and isOptional as settings and drop the protected acceptsNull. Exclude enum values from the jsonEncode shortcut, qualify transform failures, narrow the codec export rule to the runtime side, and state that value-model files have no part. The naming test now rejects any constraint key or code that is not plain string literals or a known forward, checks parameter defaults, and asserts the fields and identifiers of real emitted errors, so transformed values and computed map keys fail too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Drop the redaction promise from AckException.toString, limit the jsonEncode shortcut to values that hold only JSON types, and note that Ack.duration() maps its bounds to milliseconds on export. The naming test now checks each result of a ternary key, skips user payload values when walking emitted errors, keeps a snake_case wire key in its fixture, and covers a schema-model warning with context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Say when a validated value can go straight to jsonEncode, when to call schema.encode first (codecs, Ack.datetime, Ack.enumValues, including a codec whose runtime value looks JSON-safe), and that a one-way transform or Ack.instance has no wire encoder. The naming test accepts only the known string_pattern_$patternName template as an interpolated key, covers native enum violations, and asserts context on the serialized trim warning itself. The compiler's private _diagnostic helper takes a named code so the source scan sees every code passed to it; behavior is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR prepares the documentation for the 2.0.0 stable release and pins Ack's naming rule. It changes no library behavior. Library code changes are dartdoc comments only.
Reviewers compared every user-facing page with the code on
main. They found no wrong API, key, or output. They did find repeated content, prerelease wording, gaps, and missing dartdoc. This PR fixes those.Changes
Naming rule (first commit)
ARCHITECTURE.mdentry records the rule.One home per topic
withDefaultvalidates when the default is used.refine, a newtransformsection, custom constraints, and messages. It also gets a decision table.SchemaErrormembers.Onboarding
ack, and generator READMEs are trimmed. The generator README goes from 381 lines to about 110.Advanced pages
XSchema.schemavsX.schemarule;Set<T>fields reject duplicates and exportuniqueItems.contains,startsWith,endsWith,length, andip().Guides and reference
Dartdoc (comments only)
SchemaErrorand its subclasses,Constraint,ConstraintError,Validator,JsonSchemaSpec, andAckException.errors.parseAsandsafeParseAsnow have distinct summaries. Boolean getters now start with "Whether".Agent skills
Setrule, and the naming rules.Not changed on purpose
2.0.0-beta.3): release step H updates these.docs.jsonhas no redirect setting, so no page was deleted, renamed, or split.Verification
dart format --set-exit-if-changed .andmelos run analyze: pass.dart test test: 80 tests pass. This includes:packages/ackdart test: 3,115 tests pass.npx @docs.page/cli@2.0.0 check: no issues.concepta.dev/.../reference/llms-txtroute, which is also onmain.https://claude.ai/code/session_01QEFHxK274pLvHpTn3qqhJG
Generated by Claude Code