Document public declarations in @typespec/http - #11539
Conversation
commit: |
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
There was a problem hiding this comment.
Pull request overview
Improves the public API documentation for @typespec/http so reference docs no longer show blank entries for key HTTP multipart/link types and decorators, and fixes an incorrect @route parameter name in doc comments (to align with path).
Changes:
- Add/expand documentation for
HttpPart,HttpPartOptions,Link,LinkHeader,PathOptions, and@multipartBody(library source + rendered docs). - Fix
@routedoc comment parameter name fromuriTemplatetopath(and update the rendered parameter tables). - Add a Chronus entry for the documentation update.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/content/docs/docs/libraries/http/reference/decorators.md | Adds @multipartBody description and fixes @route parameter table description. |
| website/src/content/docs/docs/libraries/http/reference/data-types.md | Fills in missing docs for HttpPart, HttpPartOptions, Link, LinkHeader, and related property/template parameter descriptions (plus example). |
| packages/http/README.md | Mirrors reference-doc improvements for @multipartBody and @route parameter table. |
| packages/http/lib/main.tsp | Adds doc comments/examples for HttpPartOptions, HttpPart, Link, LinkHeader. |
| packages/http/lib/decorators.tsp | Adds PathOptions docs, expands @multipartBody docs, and corrects @route @param name. |
| packages/http/lib/auth.tsp | Adds missing property-level doc for NoAuth.type. |
| packages/http/generated-defs/TypeSpec.Http.ts | Regenerates/updates the TS declarations docblocks to match the new TypeSpec docs (e.g., @multipartBody, @route). |
| .chronus/changes/docs-http-2026-8-11.md | Adds a Chronus entry for the documentation updates. |
| * fullName: HttpPart<string>, | ||
| * headShots: HttpPart<Image>[], |
ca1da1e to
810cc57
Compare
|
Addressed both review comments in 810cc57:
Also picked up one extra fix here, surfaced by the reviewer feedback on #11543: |
Adds the missing doc comments on `HttpPartOptions`, `HttpPart`, `Link`, `LinkHeader`, `PathOptions`, `@multipartBody`, `NoAuth.type` and the template parameters of `HttpPart`/`LinkHeader`. Also fixes the `@route` doc comment, which documented a `uriTemplate` parameter while the declared parameter is named `path`. Prerequisite for #1229 and #2090.
810cc57 to
a0c93ed
Compare
Several public declarations in
@typespec/httpship with no documentation at all, so they render as blank rows in the reference docs:HttpPart,Link,LinkHeader,HttpPartOptions,PathOptions,@multipartBody, and the template parameters ofHttpPart/LinkHeader.This fills those in.
It also fixes a doc comment that documents a parameter that does not exist:
Prerequisite for #1229 and #2090. The library linter rule that catches this is in #11543, which must merge after this one:
lint-typespec-libraryruns with--warn-as-errorinside every package'sbuild, so the docs have to exist before the rule is turned on.Independent of the other documentation PRs (#11540, #11541, #11542) — they touch disjoint packages and can merge in any order.