Skip to content

Commit d401f9b

Browse files
haiyuazhangCopilot
andcommitted
Prepare specs for no-url-suffix lint rule
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>
1 parent f966bb5 commit d401f9b

195 files changed

Lines changed: 549 additions & 34 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
engine-strict=true
2+
legacy-peer-deps=true

package-lock.json

Lines changed: 18 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"@azure-tools/typespec-azure-core": "0.69.0",
1111
"@azure-tools/typespec-azure-portal-core": "0.69.0",
1212
"@azure-tools/typespec-azure-resource-manager": "0.69.1",
13-
"@azure-tools/typespec-azure-rulesets": "0.69.1",
13+
"@azure-tools/typespec-azure-rulesets": "https://pkg.pr.new/@azure-tools/typespec-azure-rulesets@4541",
1414
"@azure-tools/typespec-client-generator-cli": "0.33.1",
15-
"@azure-tools/typespec-client-generator-core": "0.69.0",
15+
"@azure-tools/typespec-client-generator-core": "https://pkg.pr.new/@azure-tools/typespec-client-generator-core@4541",
1616
"@azure-tools/typespec-liftr-base": "0.13.0",
1717
"@azure-tools/typespec-metadata": "0.2.0",
1818
"@azure/avocado": "0.11.0",

specification/ai/Azure.AI.Agents/messages/models.tsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ model MessageInputImageUrlBlock extends MessageInputContentBlock {
6666
@doc("Must be 'image_url' for an externally hosted image block.")
6767
type: "image_url";
6868

69+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
70+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
6971
@doc("Information about the external image URL, including the URL and optional detail level.")
7072
@encodedName("application/json", "image_url")
7173
imageUrl: MessageImageUrlParam;

specification/ai/Azure.AI.Agents/tools/models.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ model MCPToolDefinition extends ToolDefinition {
164164
@encodedName("application/json", "server_label")
165165
serverLabel: string;
166166

167+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
168+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
167169
@doc("The endpoint for the MCP server")
168170
@encodedName("application/json", "server_url")
169171
serverUrl: string;
@@ -1466,6 +1468,7 @@ model ComputerScreenshot {
14661468
@encodedName("application/json", "file_id")
14671469
fileId?: string;
14681470

1471+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
14691472
@doc("The URL of the screenshot image.")
14701473
@encodedName("application/json", "image_url")
14711474
imageUrl?: string;

specification/ai/ContentUnderstanding/models.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ model LabeledDataKnowledgeSource extends KnowledgeSource {
204204
@doc("A blob container containing labeled data.")
205205
kind: KnowledgeSourceKind.labeledData;
206206

207+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
207208
@doc("The URL of the blob container containing labeled data.")
208209
containerUrl: url;
209210

specification/ai/DocumentIntelligence/models.tsp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ model AnalyzeBatchDocumentsRequest {
389389
""")
390390
azureBlobFileListSource?: AzureBlobFileListContentSource;
391391

392+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
392393
@doc("Azure Blob Storage container URL where analyze result files will be stored.")
393394
resultContainerUrl: url;
394395

@@ -514,9 +515,11 @@ model AnalyzeBatchOperationDetail {
514515
@doc("Analyze status. succeeded, failed, or skipped")
515516
status: DocumentIntelligenceOperationStatus;
516517

518+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
517519
@doc("URL of the source document.")
518520
sourceUrl: url;
519521

522+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
520523
@doc("URL of the analyze result JSON.")
521524
resultUrl?: url;
522525

@@ -1187,6 +1190,7 @@ model BuildDocumentModelRequest {
11871190

11881191
@doc("Azure Blob Storage content.")
11891192
model AzureBlobContentSource {
1193+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
11901194
@doc("Azure Blob Storage container URL.")
11911195
containerUrl: url;
11921196

@@ -1196,6 +1200,7 @@ model AzureBlobContentSource {
11961200

11971201
@doc("File list in Azure Blob Storage.")
11981202
model AzureBlobFileListContentSource {
1203+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
11991204
@doc("Azure Blob Storage container URL.")
12001205
containerUrl: url;
12011206

specification/ai/Face/main.tsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ model AADToken
4343
is OAuth2Auth<[
4444
{
4545
type: OAuth2FlowType.authorizationCode;
46+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
4647
authorizationUrl: "https://api.example.com/oauth2/authorize";
48+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
4749
tokenUrl: "https://api.example.com/oauth2/token";
4850
scopes: ["https://cognitiveservices.azure.com/.default"];
4951
}

specification/ai/ImageAnalysis/routes.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ op analyzeFromUrl is Azure.Core.RpcOperation<
9494
@header
9595
contentType: "application/json";
9696

97+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
9798
@doc("The image to be analyzed")
9899
@bodyRoot
99100
imageUrl: ImageUrl;

specification/ai/ModelInference/models/chat_completions.tsp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ model ChatMessageImageContentItem extends ChatMessageContentItem {
664664
@doc("The discriminated object type: always 'image_url' for this type.")
665665
type: "image_url";
666666

667+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
667668
@doc("An internet location, which must be accessible to the model, from which the image may be retrieved.")
668669
@encodedName("application/json", "image_url")
669670
imageUrl: ChatMessageImageUrl;
@@ -706,6 +707,7 @@ model ChatMessageAudioContentItem extends ChatMessageContentItem {
706707
@doc("The discriminated object type: always 'audio_url' for this type.")
707708
type: "audio_url";
708709

710+
#suppress "@azure-tools/typespec-client-generator-core/csharp-no-url-suffix" "Name kept for backward compatibility"
709711
@doc("An internet location, which must be accessible to the model, from which the audio may be retrieved.")
710712
@encodedName("application/json", "audio_url")
711713
audioUrl: ChatMessageAudioUrl;

0 commit comments

Comments
 (0)