Skip to content

docs(spec-api): Add JSDoc for public APIs [skip chg] - #12236

Merged
Timothee Guerin (timotheeguerin) merged 6 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-spec-api-contracts
Oct 16, 2026
Merged

Timothee Guerin (timotheeguerin) merged 6 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-spec-api-contracts

Conversation

@timotheeguerin

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

Copy link
Copy Markdown
Member

Mock authors need to know how scenarios, request coverage, matching, validation, and response helpers interact, including what body representations helpers actually accept and return.

Document the public spec API together with its resolver, coverage, and format-specific limitations. No matching or mock-server behavior changes.

Consolidates 12246.

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/spec-api@12236

commit: db43821

@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

These documentation-only changes leave behavior unchanged, with only a minor comparison-description correction remaining.

1 open finding
What changed in this PR

Expands public contract documentation in spec-api as part of issue #12228, without changing runtime behavior or API signatures.

Changes:

  • Documents request expectations, custom handlers, and multipart inputs.
  • Clarifies payload resolution, streaming responses, and scenario coverage.
File Description
packages/​spec-api/​src/​types.ts Adds JSDoc for mock, resolver, and scenario contracts.

🧠 Review effort: Balanced


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

Comment on lines +105 to +106
* Expected request payload. JSON and XML are compared structurally; Buffer payloads
* are compared byte-for-byte. Multipart validation requires a custom handler.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 14:12

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 documentation matches the reviewed implementations, preserves behavior and signatures, and has no unresolved findings.

1 open finding

🧠 Review effort: Balanced

@timotheeguerin Timothee Guerin (timotheeguerin) changed the title docs(spec-api): Add JSDoc for mock and scenario contracts [skip chg] docs(spec-api): Add JSDoc for public APIs [skip chg] Oct 16, 2026
@timotheeguerin
Timothee Guerin (timotheeguerin) merged commit d1bc2a6 into microsoft:main Oct 16, 2026
31 of 33 checks passed
@timotheeguerin
Timothee Guerin (timotheeguerin) deleted the docs/jsdoc-spec-api-contracts branch October 16, 2026 16:08
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