Skip to content

Prepare specs for no-url-suffix lint rule#43818

Draft
haiyuazhang wants to merge 10 commits into
mainfrom
haiyzhan/fix-no-url-suffix
Draft

Prepare specs for no-url-suffix lint rule#43818
haiyuazhang wants to merge 10 commits into
mainfrom
haiyzhan/fix-no-url-suffix

Conversation

@haiyuazhang

Copy link
Copy Markdown
Member

Summary

Prepares existing TypeSpec specs for Azure/typespec-azure#4541 (@azure-tools/typespec-client-generator-core/no-url-suffix).

  • Adds isolated C# @@clientName(..., "...Uri", "csharp") customizations in new minimal client.tsp files where doing so does not pull in existing client customizations.
  • Adds targeted #suppress directives where a clientName fix is not safe or not expressible, such as OAuth metadata fields, inline/aliased properties, or projects with existing client.tsp files whose import would apply unrelated SDK customizations.
  • Does not include generated OpenAPI/JSON changes.

Validation

  • npx tsp compile . --no-emit for all 154 affected TypeSpec projects
  • npx tsp compile . for the 25 projects with new minimal client.tsp imports
  • git diff --check -- specification
  • Confirmed no generated JSON diffs

Related to Azure/typespec-azure#4541.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR is in purview of the ARM review (label: ARMReview). This PR must get ARMSignedOff label from an ARM reviewer.
    This PR is awaiting ARM reviewer feedback (label: WaitForARMFeedback).
    To learn when this PR will get reviewed, see ARM review queue at aka.ms/azsdk/pr-arm-review
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ The required check named Swagger Avocado has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
TypeSpec ActionGroupsApi
TypeSpec Microsoft.ContainerService
TypeSpec ApiCollectionsAPI
TypeSpec Microsoft.ApiManagement
TypeSpec Microsoft.AppComplianceAutomation
TypeSpec Microsoft.Web
TypeSpec Astronomer.Astro
TypeSpec Microsoft.Automation
TypeSpec Microsoft.AVS
TypeSpec Azure.AI.Agents
TypeSpec Azure.ProgrammableConnectivity
TypeSpec Microsoft.AzureFleet
TypeSpec Microsoft.AzureResilienceManagement
TypeSpec Microsoft.Batch
TypeSpec Microsoft.Billing
TypeSpec Microsoft.BotService
TypeSpec Microsoft.Compute
TypeSpec Microsoft.Carbon
TypeSpec Microsoft.Cdn
TypeSpec Microsoft.CognitiveServices
TypeSpec ComponentAPIs
TypeSpec Compute
TypeSpec Microsoft.ComputeBulkActions
TypeSpec ComputeDisk
TypeSpec Microsoft.ComputeSchedule
TypeSpec Microsoft.Confluent
TypeSpec Microsoft.ConnectedCache
TypeSpec Microsoft.Consumption
TypeSpec Microsoft.App
TypeSpec Microsoft.ContainerInstance
TypeSpec ContentUnderstanding
TypeSpec Microsoft.CostManagement
TypeSpec Microsoft.Dashboard
TypeSpec Microsoft.DatabaseWatcher
TypeSpec Microsoft.DataBox
TypeSpec Microsoft.DataBoxEdge
TypeSpec Microsoft.Databricks
TypeSpec DataCollectionApi
TypeSpec Microsoft.Datadog
TypeSpec Microsoft.DataFactory
TypeSpec Microsoft.DataMigration
TypeSpec Microsoft.DataProtection
TypeSpec Microsoft.MachineLearningServices.DatasetDataplane
TypeSpec Dell.Storage
TypeSpec Microsoft.DependencyMap
TypeSpec Microsoft.DesktopVirtualization
TypeSpec DevCenterService
TypeSpec Microsoft.DevCenter
TypeSpec Microsoft.DevHub
TypeSpec Microsoft.DeviceRegistry
TypeSpec Microsoft.DevTestLab
TypeSpec Microsoft.Discovery.Bookshelf
TypeSpec Microsoft.Network
TypeSpec Microsoft.DocumentDB
TypeSpec DocumentIntelligence
TypeSpec DocumentTranslation
TypeSpec Microsoft.DurableTask
TypeSpec Dynatrace.Observability
TypeSpec Easm
TypeSpec Microsoft.EdgeOrder
TypeSpec Microsoft.Elastic
TypeSpec Microsoft.EventGrid
TypeSpec Microsoft.EventGrid.SystemEvents
TypeSpec Face
TypeSpec Storage.File
TypeSpec Microsoft.DBforMySQL
TypeSpec MapsGeolocation
TypeSpec Microsoft.HDInsight
TypeSpec Microsoft.HealthcareApis
TypeSpec HealthDataAIServices.DeidServices
TypeSpec Microsoft.HealthDataAIServices
TypeSpec Microsoft.HybridCompute
TypeSpec Microsoft.Kubernetes
TypeSpec ImageAnalysis
TypeSpec Microsoft.Impact
TypeSpec Informatica.DataManagement
TypeSpec Microsoft.Kusto
TypeSpec Language.Conversations
TypeSpec Language.Conversations.Authoring
TypeSpec Language.AnalyzeDocuments
TypeSpec Language.Text
TypeSpec Language.Text.Authoring
TypeSpec Language.QuestionAnswering.Authoring
TypeSpec Azure.Monitor.LiveMetrics
TypeSpec Microsoft.LoadTestService
TypeSpec Microsoft.MachineLearningServices
TypeSpec Microsoft.ManagedIdentity
TypeSpec Microsoft.ManagedNetworkFabric
TypeSpec Microsoft.ManufacturingPlatform
TypeSpec Microsoft.Maps
TypeSpec Microsoft.EdgeMarketplace
TypeSpec Microsoft.PlanetaryComputer
TypeSpec MongoDB.Atlas
TypeSpec Microsoft.NetworkCloud
TypeSpec NewRelic.Observability
TypeSpec Microsoft.NotificationHubs
TypeSpec Microsoft.OnlineExperimentation
TypeSpec Azure.OpenAI
TypeSpec Oracle.Database
TypeSpec PaloAltoNetworks.Cloudngfw
TypeSpec Microsoft.Monitor
TypeSpec Playwright
TypeSpec PolicyInsightsApi
TypeSpec Microsoft.ProgrammableConnectivity
TypeSpec PureStorage.Block
TypeSpec Quantum.Workspace
TypeSpec Microsoft.RecoveryServices
TypeSpec Microsoft.Cache
TypeSpec Microsoft.ContainerRegistry
TypeSpec MapsRender
TypeSpec Microsoft.ResourceHealth
TypeSpec MapsRoute
TypeSpec Search
TypeSpec SecurityConnectorsDevOpsAPI
TypeSpec Microsoft.SecurityInsights
TypeSpec SecuritySolutionsAPI
TypeSpec SecurityStandardsAPI
TypeSpec Microsoft.ServiceFabric
TypeSpec Microsoft.SqlVirtualMachine
TypeSpec Microsoft.AzureStackHCI
TypeSpec Microsoft.StorageCache
TypeSpec Microsoft.Subscription
TypeSpec Microsoft.Resources
TypeSpec CustomVoiceApi
TypeSpec MapsTimezone
TypeSpec MapsTraffic
TypeSpec MapsWeather
TypeSpec WebTestsApi
TypeSpec Microsoft.Workloads
TypeSpec Microsoft.MachineLearningServices.WorkspaceDataplane
TypeSpec Microsoft.Migrate
TypeSpec Microsoft.AzureArcData
TypeSpec Storage.Blob
TypeSpec Commvault.ContentStore

Comment generated by After APIView workflow run.

@haiyuazhang

Copy link
Copy Markdown
Member Author

The Swagger Avocado failures are pre-existing MULTIPLE_API_VERSION errors in readme.md files not modified by this PR:

  • specification/applicationinsights/.../readme.md (tag package-2024-08-01)
  • specification/compute/.../readme.md (tag package-2025-11-01)
  • specification/monitor/.../readme.md (tag package-2025-08)
  • specification/network/.../readme.md (tag package-2025-07-01)
  • specification/policyinsights/.../readme.md (tag package-2024-10)
  • specification/security/.../readme.md (tag package-composite-v3)

Our PR only modifies .tsp and client.tsp files in these services, which triggers Avocado to scan their readme — but the errors are unrelated to our changes.

Comment thread specification/ai/DocumentIntelligence/client.tsp Outdated

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.

I don't think this PR should be doing anything else but adding suppresions. This service for example doesn't define client emitter in its tspconfig so its probably not generating SDK we shouldn't have to apply those rules(why the separate ruleset)

@haiyuazhang haiyuazhang Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

all violations are handled by #suppress now and no client.tsp is added by this PR. The errors in TSV check are caused by override-parameters-mismatch , not related to this PR.

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.

i think this just means you haven't pulled in the changes from main in the typespec-azure pr because I believe @tadelesh fixed those issues

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.

but at this point as this needs to be opt-int until we have the tsv enforcement this pr is not blocking the typespec-azure one from being merged, you'll just need to make sure the final one is green when upgrading the version to what is published

@haiyuazhang haiyuazhang Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I rebased the rule PR and repinned the latest build from the rule PR. TSV check still fails. It probably because the spec fix is still on typespec-next not yet synced to main yet.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

all TSV checks all pass now

Add #suppress directives and @@clientName URL-to-Uri customizations across affected TypeSpec specs in preparation for the no-url-suffix lint rule. Squashed rebase of PR #43818 onto latest main; resolved the liftrmongodb client.tsp conflict by keeping both the Project/Cluster renames from main and the redirectUrl->redirectUri rename.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
haiyuazhang and others added 7 commits June 30, 2026 23:10
Each flagged property had the identical #suppress line written twice. Collapse the 32 exact-duplicate suppressions (across 16 files) to a single suppression per property.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6 properties (botservice x4, cost-management x2) had csharp-no-url-suffix suppressed twice with a pre-existing casing-style suppress between the two, so they were non-adjacent and missed by the first dedup pass. Collapse to a single csharp-no-url-suffix suppression per property.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ecs, drop suppressions elsewhere

Step 2 of the no-url-suffix rollout. The csharp-no-url-suffix rule now lives in the new client-sdk ruleset (typespec-azure #4541), so: (1) add the client-sdk ruleset to linter.extends in all 349 tspconfigs configured to emit a client SDK, (2) remove the 60 now-dead suppressions from 25 non-client projects, (3) refresh the @4541 lockfile pin to build .1516 which contains the moved rule.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The @4541 pkg.pr.new moving tag repacks with a new hash on each fetch, so npm ci fails with EINTEGRITY (lockfile integrity != freshly downloaded tarball). Pin both @azure-tools/typespec-azure-rulesets and @azure-tools/typespec-client-generator-core to the immutable commit-specific URL @97378df6, which serves a byte-stable tarball. Integrity values are unchanged (they already match the commit artifact).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ents; fix cloudhealth tspconfig format

Step 2 removed csharp-no-url-suffix suppressions from sub-projects whose own tspconfig is non-client, but whose models are compiled by a client-SDK parent (applicationinsights, compute/Compute, monitor/Insights, network/Network). With client-sdk added to those parents, the rule fired on the now-unsuppressed *Url properties (50 TSV errors). Restore the 25 suppressions in the 7 shared model files. Also convert cloudhealth linter.extends from inline array to block list (prettier/tsv Format rule).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e fix)

Repin to the immutable commit URL @30de6998 (build 0.70.0-pr-4541.1525), which includes tadelesh's #4730 @OverRide regression fix. With #4730, the override-parameters-mismatch errors drop to 37 (the genuine 'override param dropped @path' cases across 11 projects); the false-positive regressions are fixed. Demonstrates #4730 reduces but does not fully clear the override errors without spec-side @path additions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ew pin)

Now that @azure-tools/typespec-client-generator-core, typespec-azure-rulesets,
and typespec-azure-resource-manager 0.69.2 are published (with the client-sdk
ruleset and the #4730 override fix), switch off the pkg.pr.new build pins.
Also drop the legacy-peer-deps=true .npmrc workaround since 0.69.2 peers resolve
cleanly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@haiyuazhang

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@haiyuazhang

Copy link
Copy Markdown
Member Author

/azp run SDK Validation - .NET, SDK Validation - Go, SDK Validation - JS, SDK Validation - Java, SDK Validation - Python, SDK Validation - Rust

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 6 pipeline(s).

haiyuazhang and others added 2 commits July 1, 2026 16:43
…masked by 0.69.2

Revert typespec-azure-resource-manager to 0.69.1 (keep tcgc + rulesets at
0.69.2). resource-manager 0.69.2 changes CommonTypes emission (external \
-> inlined definitions), which regenerates swagger for RM projects (e.g.
devcenter, maps) and is unrelated to the url-suffix rule. The rulesets 0.69.2
peer on resource-manager ^0.69.2 is only an npm warning.

Add csharp-no-url-suffix suppressions for 11 properties in cognitiveservices,
policyinsights, and security. These were previously hidden because those
projects had compile-blocking override-parameters-mismatch errors; 0.69.2's
override fix unmasked them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
npm ci uses strict peer resolution and errored with ERESOLVE because
typespec-azure-rulesets@0.69.2 has a peer of resource-manager@^0.69.2 while we
deliberately keep resource-manager at 0.69.1 (to avoid CommonTypes swagger
regeneration). A surgical overrides entry satisfies the peer without adding
legacy-peer-deps to .npmrc. The resolved tree is unchanged (rm stays 0.69.1),
so package-lock.json needs no update. Verified
pm ci no longer ERESOLVEs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@haiyuazhang

Copy link
Copy Markdown
Member Author

The required SDK Validation check fails with  unknown-rule-set: client-sdk  because every SDK repo's  emitter-package.json  still pins the typespec-azure toolchain below 0.69.2 (where  client-sdk  was added) — do we need to bump  typespec-azure-rulesets / typespec-client-generator-core to 0.69.2 in each SDK repo as a precondition for merging this spec PR?

@haiyuazhang

Copy link
Copy Markdown
Member Author

@timotheeguerin As yuchao pointed out in his tcgc version bump PR Azure/azure-sdk-for-python#47811, we need to wait 6 days to satisfy the new 7 days law for new npm package.

Comment thread package.json
"superagent": "^10.2.3"
"superagent": "^10.2.3",
"@azure-tools/typespec-azure-rulesets": {
"@azure-tools/typespec-azure-resource-manager": "0.69.1"

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.

What happened here? Why are we overriding this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants