[TS] Document api-version, examples-dir, namespace emitter options; remove unused should-use-pnpm-dep#4873
Open
JialinHuang803 wants to merge 1 commit into
Conversation
…d remove unused should-use-pnpm-dep Adds the TCGC-forwarded options (api-version, examples-dir, namespace) to the typespec-ts EmitterOptionsSchema so they appear in the generated reference docs, and removes the unused internal should-use-pnpm-dep option. Regenerated the website reference doc. Addresses part of Azure#4077. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6c667f5-be6d-4fed-8a11-4b1f5473bdc5
Contributor
|
All changed packages have been documented.
Show changes
|
commit: |
Contributor
⚡ Benchmark Results
Full details – comparing
|
| Metric | Baseline | Current | Change |
|---|---|---|---|
| total | 🔴 1.03s | 🔴 566.3ms | -44.8% 🟢 |
| loader | 🟡 310.9ms | 🟢 170.8ms | -45.1% 🟢 |
| resolver | 🟢 40.5ms | 🟢 26.5ms | -34.5% 🟢 |
| checker | 🟡 369.3ms | 🟡 200.4ms | -45.7% 🟢 |
| validation | 🟢 85.6ms | 🟢 50.3ms | -41.3% 🟢 |
| ↳ validation/@azure-tools/typespec-azure-core | 🟡 12.8ms | 🟢 6.7ms | -47.3% 🟢 |
| ↳ validation/@typespec/http | 🟡 15.7ms | 🟢 8.4ms | -46.6% 🟢 |
| ↳ validation/@typespec/rest | 🟢 1.6ms | 🟢 1.0ms | -36.2% |
| ↳ validation/@typespec/versioning | 🔴 51.5ms | 🔴 31.5ms | -38.8% 🟢 |
| ↳ validation/compiler | 🟢 3.9ms | 🟢 2.6ms | -34.2% 🟢 |
| linter | 🟡 218.5ms | 🟢 117.6ms | -46.2% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/auth-required | 🟢 0.1ms | 🟢 0.0ms | -48.0% |
| ↳ linter/@azure-tools/typespec-azure-core/bad-record-type | 🟢 0.6ms | 🟢 0.4ms | -32.8% |
| ↳ linter/@azure-tools/typespec-azure-core/byos | 🟢 8.5ms | 🟢 4.8ms | -43.1% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/casing-style | 🟢 1.5ms | 🟢 0.9ms | -37.0% |
| ↳ linter/@azure-tools/typespec-azure-core/composition-over-inheritance | 🟢 0.2ms | 🟢 0.1ms | -34.2% |
| ↳ linter/@azure-tools/typespec-azure-core/documentation-required | 🟢 2.0ms | 🟢 1.2ms | -39.9% |
| ↳ linter/@azure-tools/typespec-azure-core/friendly-name | 🟢 1.4ms | 🟢 0.8ms | -43.4% |
| ↳ linter/@azure-tools/typespec-azure-core/key-visibility-required | 🟢 0.4ms | 🟢 0.2ms | -45.2% |
| ↳ linter/@azure-tools/typespec-azure-core/known-encoding | 🟢 0.5ms | 🟢 0.3ms | -46.9% |
| ↳ linter/@azure-tools/typespec-azure-core/long-running-polling-operation-required | 🟢 0.8ms | 🟢 0.5ms | -35.2% |
| ↳ linter/@azure-tools/typespec-azure-core/no-case-mismatch | 🟢 0.7ms | 🟢 0.4ms | -36.4% |
| ↳ linter/@azure-tools/typespec-azure-core/no-closed-literal-union | 🟢 1.0ms | 🟢 0.6ms | -38.6% |
| ↳ linter/@azure-tools/typespec-azure-core/no-enum | 🟢 0.2ms | 🟢 0.2ms | -35.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-error-status-codes | 🟢 0.3ms | 🟢 0.2ms | -44.6% |
| ↳ linter/@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops | 🟢 0.2ms | 🟢 0.1ms | -41.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-format | 🟢 0.8ms | 🟢 0.5ms | -41.4% |
| ↳ linter/@azure-tools/typespec-azure-core/no-generic-numeric | 🟢 0.8ms | 🟢 0.6ms | -34.6% |
| ↳ linter/@azure-tools/typespec-azure-core/no-header-explode | 🔴 27.2ms | 🟡 13.4ms | -50.9% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/no-legacy-usage | 🟢 2.1ms | 🟢 1.2ms | -44.7% |
| ↳ linter/@azure-tools/typespec-azure-core/no-multiple-discriminator | 🟢 0.2ms | 🟢 0.1ms | -49.4% |
| ↳ linter/@azure-tools/typespec-azure-core/no-nullable | 🟢 0.4ms | 🟢 0.3ms | -40.4% |
| ↳ linter/@azure-tools/typespec-azure-core/no-offsetdatetime | 🟢 2.0ms | 🟢 1.1ms | -43.3% |
| ↳ linter/@azure-tools/typespec-azure-core/no-openapi | 🟢 2.3ms | 🟢 1.4ms | -37.9% |
| ↳ linter/@azure-tools/typespec-azure-core/no-private-usage | 🟢 3.2ms | 🟢 1.9ms | -41.6% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/no-query-explode | 🔴 28.3ms | 🟡 13.8ms | -51.2% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/no-response-body | 🔴 33.9ms | 🟡 17.8ms | -47.5% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/no-rest-library-interfaces | 🟢 0.1ms | 🟢 0.1ms | -32.1% |
| ↳ linter/@azure-tools/typespec-azure-core/no-route-parameter-name-mismatch | 🟢 7.8ms | 🟢 3.9ms | -49.7% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/no-rpc-path-params | 🟢 0.4ms | 🟢 0.2ms | -45.9% |
| ↳ linter/@azure-tools/typespec-azure-core/no-string-discriminator | 🟢 0.1ms | 🟢 0.1ms | -48.0% |
| ↳ linter/@azure-tools/typespec-azure-core/no-unknown | 🟢 0.4ms | 🟢 0.2ms | -42.9% |
| ↳ linter/@azure-tools/typespec-azure-core/no-unnamed-union | 🟢 0.8ms | 🟢 0.5ms | -39.2% |
| ↳ linter/@azure-tools/typespec-azure-core/operation-missing-api-version | 🟢 0.4ms | 🟢 0.2ms | -33.6% |
| ↳ linter/@azure-tools/typespec-azure-core/request-body-problem | 🟢 0.5ms | 🟢 0.3ms | -31.0% |
| ↳ linter/@azure-tools/typespec-azure-core/require-versioned | 🟢 0.1ms | 🟢 0.0ms | -44.7% |
| ↳ linter/@azure-tools/typespec-azure-core/response-schema-problem | 🔴 33.2ms | 🟡 17.1ms | -48.5% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/rpc-operation-request-body | 🟢 0.7ms | 🟢 0.4ms | -46.3% |
| ↳ linter/@azure-tools/typespec-azure-core/spread-discriminated-model | 🟢 0.5ms | 🟢 0.3ms | -40.8% |
| ↳ linter/@azure-tools/typespec-azure-core/use-standard-names | 🟢 7.7ms | 🟢 3.8ms | -51.2% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-core/use-standard-operations | 🟢 0.3ms | 🟢 0.1ms | -44.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources | 🔴 21.7ms | 🟢 6.6ms | -69.5% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations | 🟢 0.3ms | 🟢 0.1ms | -54.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-common-types-version | 🟡 12.3ms | 🟢 6.0ms | -51.0% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key | 🟢 0.2ms | 🟢 0.1ms | -42.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage | 🟢 0.1ms | 🟢 0.1ms | -35.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes | 🟢 5.0ms | 🟢 3.2ms | -36.7% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts | 🟡 17.2ms | 🟢 8.9ms | -48.5% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-record | 🟢 0.6ms | 🟢 0.5ms | -29.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes | 🟢 1.4ms | 🟢 1.0ms | -25.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes | 🟢 0.2ms | 🟢 0.1ms | -35.0% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment | 🟢 0.5ms | 🟢 0.3ms | -42.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property | 🟢 0.4ms | 🟢 0.2ms | -40.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator | 🟢 0.1ms | 🟢 0.1ms | -41.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb | 🟢 0.2ms | 🟢 0.1ms | -42.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property | 🟢 0.3ms | 🟢 0.2ms | -40.8% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format | 🟢 0.2ms | 🟢 0.1ms | -38.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars | 🟢 0.5ms | 🟢 0.3ms | -46.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern | 🟢 0.1ms | 🟢 0.1ms | -34.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation | 🟢 0.6ms | 🟢 0.4ms | -35.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response | 🟢 9.1ms | 🟡 13.8ms | +51.1% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-patch | 🟢 0.8ms | 🟢 0.5ms | -41.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars | 🟢 0.4ms | 🟢 0.2ms | -41.9% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state | 🟢 0.4ms | 🟢 0.3ms | -34.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels | 🟢 0.2ms | 🟢 0.1ms | -38.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/empty-updateable-properties | 🟢 0.4ms | 🟢 0.2ms | -47.0% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation | 🟢 0.1ms | 🟢 0.1ms | -46.1% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header | 🔴 20.0ms | 🟢 9.6ms | -52.3% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint | 🟢 0.1ms | 🟢 0.1ms | -45.0% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers | 🟢 1.0ms | 🟢 0.7ms | -30.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-empty-model | 🟢 0.3ms | 🟢 0.2ms | -38.9% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-override-props | 🟢 0.3ms | 🟢 0.2ms | -30.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-reserved-resource-property | 🟢 0.2ms | 🟢 0.1ms | -39.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation | 🟢 0.5ms | 🟢 0.2ms | -51.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-response-body | 🔴 30.4ms | 🟡 15.0ms | -50.8% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/patch-envelope | 🟢 0.4ms | 🟢 0.2ms | -48.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/resource-name | 🟢 0.4ms | 🟢 0.3ms | -42.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/secret-prop | 🟢 5.4ms | 🟢 3.5ms | -35.9% 🟢 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/unsupported-type | 🟢 0.7ms | 🟢 0.4ms | -37.9% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/version-progression | 🟢 0.3ms | 🟢 0.2ms | -28.2% |
| ↳ linter/@azure-tools/typespec-client-generator-core/property-name-conflict | 🟢 2.3ms | 🟢 1.3ms | -44.2% 🟢 |
| ↳ linter/@azure-tools/typespec-client-generator-core/require-client-suffix | 🟢 1.7ms | 🟢 1.0ms | -39.3% |
| emit | 🔴 6.13s | 🔴 3.33s | -45.7% 🟢 |
| ↳ emit/@Azure-Tools | 🟢 0.0ms | 🟢 0.0ms | +0.0% |
| ↳ emit/@azure-tools/typespec-autorest | 🟢 127.0ms | 🟢 75.5ms | -40.5% 🟢 |
| ↳ emit/@azure-tools/typespec-python | 🔴 2.28s | 🔴 1.20s | -47.4% 🟢 |
| ↳ emit/@typespec | 🟢 0.0ms | 🟢 0.0ms | +0.0% |
| ↳ emit/@typespec/http-client-js | 🔴 578.5ms | 🟡 343.8ms | -40.6% 🟢 |
| ↳ emit/@typespec/openapi3 | 🟢 109.5ms | 🟢 63.1ms | -42.3% 🟢 |
| ↳ emit/@typespec/openapi3/compute | 🟢 95.1ms | 🟢 55.0ms | -42.2% 🟢 |
| ↳ emit/@typespec/openapi3/write | 🟢 14.0ms | 🟢 7.9ms | -43.7% 🟢 |
Averaged across 3 specs (azure-arm-resource-manager, azure-core-dataplane, azure-full).
Threshold: changes > ±5% are highlighted.
🟢 Fast · 🟡 Moderate (stages >200ms, rules >10ms) · 🔴 Slow (stages >400ms, rules >20ms)
Contributor
|
You can try these changes here
|
lirenhe
approved these changes
Jul 13, 2026
qiaozha
reviewed
Jul 13, 2026
| "typespec-title-map"?: Record<string, string>; | ||
| "ignore-enum-member-name-normalize"?: boolean; | ||
| //TODO should remove this after finish the release tool test | ||
| "should-use-pnpm-dep"?: boolean; |
Member
There was a problem hiding this comment.
This option is a transit option for backward compatibility when we migrate the SDK repo from rush into pnpm to manage the packages.
qiaozha
approved these changes
Jul 13, 2026
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.
Addresses part of #4077 (document all supported emitter CLI options).
What
typespec-tsbut undocumented:api-version– generate the SDK for a specific version (orlatest/all, or a per-service map)examples-dir– directory the emitter looks in for example filesnamespace– override namespace for spec typesshould-use-pnpm-depoption (it was declared in the schema/interface but never read anywhere, and was flagged with a// TODO should removecomment).Why
These options are forwarded via
context.optionsinto TCGC'screateSdkContext(api-version→apiVersion,examples-dir→examplesDir,namespace→namespaceFlag) and affect generation, but were missing from the emitter options schema, so they never showed up in the generated reference docs.api-versionin particular was only documented for Python (per the issue).Changes
packages/typespec-ts/src/lib.ts– add the three options toEmitterOptions+EmitterOptionsSchema; removeshould-use-pnpm-dep.packages/typespec-ts/README.md– matching doc updates.website/.../typespec-ts/reference/emitter.md– regenerated vianpm run regen-docs.internal).Note: options with
additionalProperties: truealready worked at runtime; this change makes them discoverable in docs and adds validation/typing.