Skip to content

docs(validator): say why fillDefaults drops the boolean arm - #68

Open
David Chicaiza (david0723) wants to merge 1 commit into
mainfrom
docs/MAIA-1286-fill-defaults-boolean-arm
Open

docs(validator): say why fillDefaults drops the boolean arm#68
David Chicaiza (david0723) wants to merge 1 commit into
mainfrom
docs/MAIA-1286-fill-defaults-boolean-arm

Conversation

@david0723

Copy link
Copy Markdown
Contributor

[Has Ai Code]

Jira: https://make.atlassian.net/browse/MAIA-1286

One comment line, no behaviour change. Closes the loose end from the #65 addendum.

fillDefaults is 'requiredOnly' | 'always' while BlueprintValidator's useDefaults is boolean | 'always' | 'requiredOnly'. The JSDoc claimed to mirror those modes without saying anything about the missing arm, so read cold it looks like an oversight. It isnt: true is a legacy alias for 'always' rather than a third behaviour, and the platform's public validation parameter already exposes only the two named modes, so there is nothing behind the boolean for a new library to inherit.

That reasoning was established in review on #65 and then never made it into the code. This puts it where the next person greps.

Notes

BlueprintValidator's useDefaults is `boolean | 'always' | 'requiredOnly'`
and fillDefaults is only the two strings. Read cold, the missing arm looks
like an oversight rather than a decision. It is a decision: `true` is a
legacy alias for 'always', not a third behaviour, and the platform's public
validation parameter already exposes only the two named modes.

Comment only, no behaviour change.

MAIA-1286

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Comment-only JSDoc clarification that aligns with existing behavior and improves the public API contract without introducing risk.

Pull request overview

Updates the public JSDoc for FormanValidationOptions.fillDefaults to explain why the BlueprintValidator boolean (useDefaults: true) mode is intentionally not mirrored in this library’s option surface, clarifying the contract without changing behavior.

Changes:

  • Expand the fillDefaults JSDoc to document the deliberate omission of BlueprintValidator’s boolean arm and the rationale behind it.
File summaries
File Description
src/types.ts Adds explanatory JSDoc clarifying why fillDefaults only supports `'requiredOnly'
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants