Skip to content

Document public API surface ahead of the library-linter documentation rules - #5183

Merged
Timothee Guerin (timotheeguerin) merged 7 commits into
Azure:mainfrom
timotheeguerin:timotheeguerin/library-linter-missing-docs
Aug 7, 2026
Merged

Document public API surface ahead of the library-linter documentation rules#5183
Timothee Guerin (timotheeguerin) merged 7 commits into
Azure:mainfrom
timotheeguerin:timotheeguerin/library-linter-missing-docs

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

microsoft/typespec#11543 adds missing-documentation and extraneous-documentation rules to @typespec/library-linter. Every Azure library already runs the linter with --warn-as-error as part of its build script, so the moment that PR lands our builds break — 94 warnings across azure-core, ARM, TCGC and portal-core.

This documents the gaps so the core PR can merge cleanly.

Two categories of problems turned up, and both were hiding real content from the published reference docs:

Doc comments starting with a tag swallowed the whole description. @deprecated isn't a tag the compiler knows, so everything after it became tag content and the description vanished:

 /**
- * @deprecated Use `@client` instead. The `@operationGroup` decorator is deprecated. Sub clients should be represented using `@client`.
  * Define the sub client generated in the client SDK.
  * ...
+ *
+ * Deprecated: use `@client` instead. Sub clients should be represented using `@client`.
  */
 extern dec operationGroup(...);

@operationGroup and ResourceOperations now actually show their description on the website. Same story for Azure.Core.ResourceOperationStatus, whose only doc was behind a @dev tag.

@template tags pointing at parameters that don't exist. Operations inside ResourceOperations, PrivateLinks and friends documented their interface's template parameters, and a few models still referenced pre-rename names (@template T on LocationOfCreatedResourceResponse<Resource>). Those are now either corrected or removed.

The rest is plain missing docs on properties, enum members, template parameters and decorator parameters.

Emitted output

Descriptions on ARM common types flow into the generated swagger, so packages/samples/common-types picks up a few additive description fields on NetworkSecurityPerimeterConfigurationProvisioningState and Severity enum values — consistent with IssueType and ResourceAssociationAccessMode, which already carry them.

Verified with tsp compile . --warn-as-error --import @typespec/library-linter against the linter build from the core branch: all six libraries are clean, and the full test suites for the touched packages pass unchanged.

The library-linter is gaining missing-documentation and extraneous-documentation
rules. Document the public declarations and members that were undocumented, and
drop doc tags referencing template parameters that no longer exist.
@microsoft-github-policy-service microsoft-github-policy-service Bot added lib:azure-core Issues for @azure-tools/typespec-azure-core library lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library lib:tcgc Issues for @azure-tools/typespec-client-generator-core library meta:website TypeSpec.io updates labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @azure-tools/typespec-azure-core
  • @azure-tools/typespec-azure-portal-core
  • @azure-tools/typespec-azure-resource-manager
  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-azure-core - internal ✏️

Document public declarations and members that were missing documentation, and remove doc tags that referenced template parameters which no longer exist

@azure-tools/typespec-azure-portal-core - internal ✏️

Document public declarations and members that were missing documentation, and remove doc tags that referenced template parameters which no longer exist

@azure-tools/typespec-azure-resource-manager - internal ✏️

Document public declarations and members that were missing documentation, and remove doc tags that referenced template parameters which no longer exist

@azure-tools/typespec-client-generator-core - internal ✏️

Document public declarations and members that were missing documentation, and remove doc tags that referenced template parameters which no longer exist

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-core@5183
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-portal-core@5183
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-resource-manager@5183
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-client-generator-core@5183

commit: ef3f036

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📦 Package size report

5 packages changed size compared to the base branch.

Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-azure-core 127.87 KB → 128.11 KB +243 B (+0.2%) 695.48 KB → 696.78 KB +1.30 KB (+0.2%)
@azure-tools/typespec-azure-portal-core 42.26 KB → 42.40 KB +147 B (+0.3%) 192.36 KB → 192.87 KB +516 B (+0.3%)
@azure-tools/typespec-azure-resource-manager 171.18 KB → 171.29 KB +106 B (+0.1%) 1.04 MB → 1.04 MB -554 B (-0.1%)
@azure-tools/typespec-client-generator-core 225.96 KB → 226.05 KB +89 B (+0.0%) 1.22 MB → 1.22 MB +317 B (+0.0%)
@azure-tools/typespec-java 13.51 MB → 13.51 MB +77 B (+0.0%) 15.03 MB → 15.03 MB
40 unchanged package(s)
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/azure-http-specs 146.21 KB → 146.21 KB 1.16 MB → 1.16 MB
@azure-tools/typespec-autorest 80.93 KB → 80.93 KB 395.06 KB → 395.06 KB
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB 26.00 KB → 26.00 KB
@azure-tools/typespec-azure-rulesets 5.15 KB → 5.15 KB 31.73 KB → 31.73 KB
@azure-tools/typespec-go 242.43 KB → 242.43 KB 1.24 MB → 1.24 MB
@azure-tools/typespec-metadata 15.91 KB → 15.91 KB 62.26 KB → 62.26 KB
@azure-tools/typespec-python 46.21 KB → 46.21 KB 180.83 KB → 180.83 KB
@azure-tools/typespec-ts 524.66 KB → 524.66 KB 2.53 MB → 2.53 MB
@typespec/asset-emitter 33.73 KB → 33.73 KB 158.67 KB → 158.67 KB
@typespec/bundler 11.31 KB → 11.31 KB 41.97 KB → 41.97 KB
@typespec/compiler 762.04 KB → 762.04 KB 3.88 MB → 3.88 MB
@typespec/emitter-framework 273.87 KB → 273.87 KB 1.50 MB → 1.50 MB
@typespec/events 8.96 KB → 8.96 KB 35.22 KB → 35.22 KB
@typespec/graphql 131.35 KB → 131.35 KB 544.77 KB → 544.77 KB
@typespec/html-program-viewer 53.96 KB → 53.96 KB 218.99 KB → 218.99 KB
@typespec/http 103.94 KB → 103.94 KB 511.18 KB → 511.18 KB
@typespec/http-canonicalization 74.18 KB → 74.18 KB 478.11 KB → 478.11 KB
@typespec/http-client 56.51 KB → 56.51 KB 281.75 KB → 281.75 KB
@typespec/http-client-js 219.98 KB → 219.98 KB 1.06 MB → 1.06 MB
@typespec/http-server-csharp 100.97 KB → 100.97 KB 409.91 KB → 409.91 KB
@typespec/http-server-js 259.10 KB → 259.10 KB 1.27 MB → 1.27 MB
@typespec/http-specs 182.15 KB → 182.15 KB 1.26 MB → 1.26 MB
@typespec/json-schema 31.66 KB → 31.66 KB 155.69 KB → 155.69 KB
@typespec/library-linter 4.35 KB → 4.35 KB 12.71 KB → 12.71 KB
@typespec/mutator-framework 71.87 KB → 71.87 KB 462.42 KB → 462.42 KB
@typespec/openapi 20.62 KB → 20.62 KB 91.67 KB → 91.67 KB
@typespec/openapi3 160.96 KB → 160.96 KB 824.53 KB → 824.53 KB
@typespec/playground 59.09 KB → 59.09 KB 239.02 KB → 239.02 KB
@typespec/prettier-plugin-typespec 157.35 KB → 157.35 KB 817.89 KB → 817.89 KB
@typespec/protobuf 94.53 KB → 94.53 KB 400.95 KB → 400.95 KB
@typespec/rest 24.18 KB → 24.18 KB 125.95 KB → 125.95 KB
@typespec/spec-api 46.54 KB → 46.54 KB 210.02 KB → 210.02 KB
@typespec/spec-coverage-sdk 41.83 KB → 41.83 KB 190.89 KB → 190.89 KB
@typespec/spector 139.66 KB → 139.66 KB 590.91 KB → 590.91 KB
@typespec/sse 5.66 KB → 5.66 KB 19.01 KB → 19.01 KB
@typespec/streams 4.12 KB → 4.12 KB 12.47 KB → 12.47 KB
@typespec/tspd 97.82 KB → 97.82 KB 430.99 KB → 430.99 KB
@typespec/versioning 36.69 KB → 36.69 KB 201.84 KB → 201.84 KB
@typespec/xml 9.41 KB → 9.41 KB 39.14 KB → 39.14 KB
tmlanguage-generator 5.00 KB → 5.00 KB 15.32 KB → 15.32 KB

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

@timotheeguerin Timothee Guerin (timotheeguerin) added the int:azure-specs Run integration tests against azure-rest-api-specs label Aug 7, 2026
ResourceOperationStatus inherited its description through `is`, and
LocationOfCreatedResourceResponse.location through its ResourceLocation type.
The new doc comments were overriding both in the emitted swagger, so pin the
API-facing text with @doc and keep the doc comment for the reference docs.
…imotheeguerin/library-linter-missing-docs
`@doc("")` set the header description to an empty string instead of letting it
inherit "The location of an instance of {name}" from ResourceLocation.

@markcowl Mark Cowlishaw (markcowl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit. I think we should see the impact on the specs repo (if any) and correct in typespec-next before merging.

Comment thread packages/typespec-azure-resource-manager/lib/interfaces.tsp

@markcowl Mark Cowlishaw (markcowl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to have a pr fixing typespec-next (and hopefully in the private repo as well)

Merged via the queue into Azure:main with commit 736816e Aug 7, 2026
43 of 44 checks passed
@timotheeguerin
Timothee Guerin (timotheeguerin) deleted the timotheeguerin/library-linter-missing-docs branch August 7, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

int:azure-specs Run integration tests against azure-rest-api-specs lib:azure-core Issues for @azure-tools/typespec-azure-core library lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library lib:tcgc Issues for @azure-tools/typespec-client-generator-core library meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants