Bump core to latest main and migrate linter rule docs to docs field#4968
Merged
Conversation
Bumps [core](https://github.com/microsoft/typespec) from `c6c1393` to `bc95fa3`. - [Release notes](https://github.com/microsoft/typespec/releases) - [Commits](microsoft/typespec@c6c1393...bc95fa3) --- updated-dependencies: - dependency-name: core dependency-version: bc95fa340fdeb713faf001a20935ae3465f0f6b1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
The core bump pulls in tspd's per-rule reference page generation. Rather than let it orphan Azure's rich hand-written rule pages at a new location, this migrates each rule to the tspd `docs` field (rich content now lives in `packages/*/src/rules/*.md`) and passes `--rules-dir ../rules` so generated pages stay at the existing `libraries/<lib>/rules/<name>` URLs (net-zero URL change). - core: bump submodule to latest main (includes merged tspd `--rules-dir` change, microsoft/typespec#11316) - 86 rules: add `docs: fileRef.fromPackageRoot("src/rules/<name>.md")` - 3 package.json regen-docs scripts: pass `--rules-dir ../rules` - astro.config: 5 redirects for rules whose historical slug != rule name - gitignore the generated `libraries/*/rules/` pages (regenerated by build:web) - pnpm-lock: add @typespec/events / @typespec/sse workspace links (http-specs)
timotheeguerin
requested review from
iscai-msft,
lmazuel,
m-nash and
srnagar
as code owners
July 21, 2026 01:13
c6c1393 to bc95fa3docs field
The core bump replaces ScaffoldingConfig.baseUri with source?: TemplateSource (microsoft/typespec#11303). Build a UriTemplateSource from the azure scaffolding index and pass it as source (mirrors #4965).
timotheeguerin
enabled auto-merge
July 21, 2026 01:24
timotheeguerin
approved these changes
Jul 21, 2026
commit: |
chidozieononiwu
pushed a commit
to chidozieononiwu/typespec
that referenced
this pull request
Jul 21, 2026
…icrosoft#11326) ## Problem Since tspd generates one reference page per linter rule and diagnostic from each definition's `docs` field, the generated pages checked into the website content duplicate their source markdown: - `website/.../libraries/http/rules/op-reference-container-route.md` ↔ `packages/http/src/rules/op-reference-container-route.md` - `website/.../emitters/openapi3/reference/diagnostics/*.md` (6 files) ↔ `packages/openapi3/src/diagnostics/*.md` Keeping both copies in git means every content edit has to be made (or regenerated) in two places. ## Fix Follow the same approach as [Azure/typespec-azure#4968](Azure/typespec-azure#4968) and the repo's existing `js-api` precedent (`**/docs/**/js-api/` is already gitignored): stop tracking the generated pages and regenerate them during the website build. - `.gitignore` — ignore the generated pages: - `website/src/content/docs/docs/**/rules/` - `website/src/content/docs/docs/**/reference/diagnostics/` - Untrack the 7 generated pages (their source markdown under `packages/*/src/**` remains the single tracked copy). The website build regenerates them: `website` build runs `build:web`, which runs `regen-all-packages-docs` before `astro check`/`astro build`. ## Validation - Deleted the generated pages from disk, ran `regen-docs` for http + openapi3, and confirmed all 7 pages are reproduced at the same paths — and git now treats them as ignored (no longer tracked, not shown as untracked). - `@typespec/http` (rules) and `@typespec/openapi3` (diagnostics) are the only libraries in this repo that use the `docs` field, so the globs only match generated content. - `chronus verify` passes (no shipped package changes). Co-authored-by: tadelesh <chenjieshi@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the
coresubmodule to latest main, which pulls in tspd's per-rule reference page generation (microsoft/typespec#11221). Left as-is, that would orphan Azure's rich hand-written rule pages by emitting barebones pages at a new location.Instead, this migrates each rule to the tspd
docsfield and keeps the generated pages at their existing URLs (net-zero URL change).Changes
--rules-dirchange (feat(tspd): add --rules-dir option to control rule reference page location microsoft/typespec#11316)docs: fileRef.fromPackageRoot("src/rules/<name>.md"); rich content now lives inpackages/*/src/rules/*.mdpackage.jsonregen-docs scripts: pass--rules-dir ../rulesso generated pages stay atlibraries/<lib>/rules/<name>prevent-format→no-format)libraries/*/rules/pages (regenerated duringbuild:web)@typespec/events/@typespec/sseworkspace links (newhttp-specspeer deps from the bump)init-templates.e2e.tsto the compiler's newTemplateSourcescaffold API —ScaffoldingConfig.baseUriwas replaced bysource?: TemplateSource(refactor(compiler): introduce TemplateSource abstraction for tsp init microsoft/typespec#11303). Supersedes test(eng): adapt init-templates e2e to TemplateSource scaffold API #4965.create-linter-ruleskill + scaffolder updated to thedocs-field workflowValidation
typespec-azure-core,typespec-azure-resource-manager,typespec-client-generator-coretests passoxlintcleanpnpm install --frozen-lockfilepassespnpm regen-docsclean (no drift)TemplateSourcepath (the 2validatetests thatnpm installan unpublished@azure-tools/typespec-autorestversion fail only on registry resolution, unrelated to this change)