Skip to content

fix(http): restore historical linter rule reference doc url#11320

Merged
tadelesh merged 1 commit into
mainfrom
tadelesh/fix-linter-rule-doc-url
Jul 21, 2026
Merged

fix(http): restore historical linter rule reference doc url#11320
tadelesh merged 1 commit into
mainfrom
tadelesh/fix-linter-rule-doc-url

Conversation

@tadelesh

Copy link
Copy Markdown
Member

Problem

The tspd change that auto-generates one reference page per linter rule (#11221) moved the @typespec/http linter rule page from its historical location:

  • Before: https://typespec.io/docs/libraries/http/rules/op-reference-container-route
  • After: https://typespec.io/docs/libraries/http/reference/rules/op-reference-container-route

This is a breaking change to the public documentation URL. The rule's own url field, external links, and the diagnostic "see documentation" link all still point at the historical libraries/http/rules/<name> location, which now 404s.

Fix

Use the --rules-dir ../rules option (added in #11316) in http's regen-docs script so the per-rule reference pages are written back to libraries/http/rules/<name>, restoring the original URL.

  • packages/http/package.json — add --rules-dir ../rules to regen-docs.
  • Regenerated docs: the rule page moves back to libraries/http/rules/op-reference-container-route.md (100% rename) and linter.md links back to ../rules/....
  • current-sidebar.ts — re-enable the http "Rules" sidebar group (hasLinterRules: true), which autogenerates from libraries/http/rules.

@typespec/http is the only library in this repo that ships linter rules, so no other library is affected.

Validation

  • regen-docs is stable (running it twice produces no diff).
  • The restored page URL libraries/http/rules/op-reference-container-route matches the rule's hardcoded url again.
  • chronus verify passes.

The tspd change that auto-generates one reference page per linter rule (#11221)
moved the http rule page from `libraries/http/rules/<name>` to
`libraries/http/reference/rules/<name>`, which broke the existing rule
documentation url (the rule's own `url` field, external links, and diagnostic
"see documentation" links all point at the historical location).

Use the `--rules-dir ../rules` option (added in #11316) in http's `regen-docs`
so the rule pages are written back to `libraries/http/rules/<name>`, restoring
the original url. Regenerate the docs and re-enable the sidebar Rules group.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: de8537de-5e61-4a0d-b2de-59ec12c15dc4
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http@11320

commit: e33cef7

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http
Show changes

@typespec/http - internal ✏️

Keep the generated linter rule reference pages at their historical libraries/http/rules/<name> location so existing rule documentation URLs stay stable.

@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@tadelesh
tadelesh enabled auto-merge July 21, 2026 00:28
@tadelesh
tadelesh added this pull request to the merge queue Jul 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 21, 2026
@tadelesh
tadelesh added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit 86449bb Jul 21, 2026
32 of 33 checks passed
@tadelesh
tadelesh deleted the tadelesh/fix-linter-rule-doc-url branch July 21, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib:http meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants