Skip to content

docs(http-canonicalization): Add JSDoc for shape-specific and options APIs [skip chg] - #12242

Closed
Timothee Guerin (timotheeguerin) wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-canonical-shapes-options
Closed

Timothee Guerin (timotheeguerin) wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-canonical-shapes-options

Conversation

@timotheeguerin

@timotheeguerin Timothee Guerin (timotheeguerin) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Consumers cannot safely reuse canonicalizations or generate union guards without knowing their cache boundaries, option defaults, and ordering rules. Identity codecs also do not imply unchanged language or wire shapes.

Document the shared engine and projection contracts, shape construction hooks, and ordered union test plans, including ambiguity failures. Make defaults and retained naming-policy behavior explicit, and explain predicate cache lifetime without changing any API or runtime behavior.

Tracked in #12228.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-canonicalization@12242

commit: 7ad41da

@azure-sdk-automation

azure-sdk-automation Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

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

The changes are documentation-only, with no unresolved correctness issues identified.

0 open findings

What changed in this PR

Documents HTTP canonicalization APIs for #12228 without changing API signatures or runtime behavior.

Changes:

  • Clarifies cache boundaries, option defaults, and predicate lifetime.
  • Documents shape construction and language/wire projections.
  • Explains union guard ordering and ambiguity failures.
File Description
packages/​http-canonicalization/​src/​union.ts Documents variant guards and ordered test plans.
packages/​http-canonicalization/​src/​union-variant.ts Clarifies variant construction and caching.
packages/​http-canonicalization/​src/​scalar.ts Documents codec selection and projections.
packages/​http-canonicalization/​src/​options.ts Explains defaults, cache keys, and naming hooks.
packages/​http-canonicalization/​src/​model.ts Documents polymorphism and projection naming.
packages/​http-canonicalization/​src/​model-property.ts Clarifies property codecs and transformations.
packages/​http-canonicalization/​src/​literal.ts Documents literal caching and projections.
packages/​http-canonicalization/​src/​intrinsic.ts Clarifies intrinsic construction semantics.
packages/​http-canonicalization/​src/​http-canonicalization.ts Documents engine reuse, predicates, and shared contracts.
packages/​http-canonicalization/​src/​http-canonicalization-classes.ts Explains dispatch and canonicalization types.
packages/​http-canonicalization/​src/​enum.ts Documents enum construction and member traversal.
packages/​http-canonicalization/​src/​enum-member.ts Clarifies enum-member leaf behavior.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@timotheeguerin

Copy link
Copy Markdown
Member Author

Consolidated into #12230 to keep one PR per package and at most five compiler PRs. The reviewed changes and corrections are preserved there.

Tracked in #12228.

Timothee Guerin (timotheeguerin) added a commit that referenced this pull request Oct 16, 2026
…2230)

Canonicalization consumers need to understand how codecs, operations,
canonical shapes, and options fit together and which discriminants
narrow returned metadata.

Document the public canonicalization APIs as one package reference,
including ownership, selection rules, and supported shapes. Keep useful
shared narrowing explanations without repetitive literal-field comments;
behavior is unchanged.

Consolidates [12235](#12235),
[12242](#12242).

Tracked in #12228.
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