diff --git a/.chronus/changes/fix-http-linter-rule-doc-url-2026-7-21.md b/.chronus/changes/fix-http-linter-rule-doc-url-2026-7-21.md new file mode 100644 index 00000000000..3a77c63e914 --- /dev/null +++ b/.chronus/changes/fix-http-linter-rule-doc-url-2026-7-21.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@typespec/http" +--- + +Keep the generated linter rule reference pages at their historical `libraries/http/rules/` location so existing rule documentation URLs stay stable. diff --git a/packages/http/package.json b/packages/http/package.json index 812e7695015..368611b2d53 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -66,7 +66,7 @@ "test:ci": "vitest run --coverage --reporter=junit --reporter=default", "lint": "oxlint . --deny-warnings", "lint:fix": "oxlint . --fix", - "regen-docs": "tspd doc . --enable-experimental --typekits --llmstxt --output-dir ../../website/src/content/docs/docs/libraries/http/reference" + "regen-docs": "tspd doc . --enable-experimental --typekits --llmstxt --output-dir ../../website/src/content/docs/docs/libraries/http/reference --rules-dir ../rules" }, "files": [ "lib/**/*.tsp", diff --git a/website/src/content/current-sidebar.ts b/website/src/content/current-sidebar.ts index a086939ec4f..c0119ce3ebd 100644 --- a/website/src/content/current-sidebar.ts +++ b/website/src/content/current-sidebar.ts @@ -124,7 +124,7 @@ const sidebar: SidebarItem[] = [ { label: "📚 Libraries", items: [ - createLibraryReferenceStructure("libraries/http", "Http", false, [ + createLibraryReferenceStructure("libraries/http", "Http", true, [ "libraries/http/cheat-sheet", "libraries/http/authentication", "libraries/http/operations", diff --git a/website/src/content/docs/docs/libraries/http/reference/linter.md b/website/src/content/docs/docs/libraries/http/reference/linter.md index f6e795cd91e..d51c365da51 100644 --- a/website/src/content/docs/docs/libraries/http/reference/linter.md +++ b/website/src/content/docs/docs/libraries/http/reference/linter.md @@ -20,6 +20,6 @@ Available ruleSets: ## Rules -| Name | Description | -| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| [`@typespec/http/op-reference-container-route`](./rules/op-reference-container-route.md) | Check for referenced (`op is`) operations which have a @route on one of their containers. | +| Name | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| [`@typespec/http/op-reference-container-route`](../rules/op-reference-container-route.md) | Check for referenced (`op is`) operations which have a @route on one of their containers. | diff --git a/website/src/content/docs/docs/libraries/http/reference/rules/op-reference-container-route.md b/website/src/content/docs/docs/libraries/http/rules/op-reference-container-route.md similarity index 100% rename from website/src/content/docs/docs/libraries/http/reference/rules/op-reference-container-route.md rename to website/src/content/docs/docs/libraries/http/rules/op-reference-container-route.md