Skip to content

Commit c247303

Browse files
Update various endpoint properties to be url rather than string (#40271)
* Update various endpoint properties to be url rather than string * format
1 parent a5a7af5 commit c247303

18 files changed

Lines changed: 54 additions & 17 deletions

File tree

specification/cognitiveservices/AnomalyDetector/main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ using TypeSpec.Versioning;
1919
Supported Azure Cognitive Services endpoints (protocol and host name, such as
2020
https://westus2.api.cognitive.microsoft.com).
2121
""")
22-
Endpoint: string,
22+
Endpoint: url,
2323

2424
@doc("Api Version")
2525
@path

specification/cognitiveservices/ContentSafety/main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ using Azure.Core;
2929
Supported Cognitive Services endpoints (protocol and hostname, for example:
3030
https://<resource-name>.cognitiveservices.azure.com).
3131
""")
32-
endpoint: string,
32+
endpoint: url,
3333
}
3434
)
3535
@doc("Analyze harmful content")

specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.1/openapi.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"in": "path",
2323
"description": "Supported Azure Cognitive Services endpoints (protocol and host name, such as\nhttps://westus2.api.cognitive.microsoft.com).",
2424
"required": true,
25-
"type": "string"
25+
"type": "string",
26+
"format": "uri",
27+
"x-ms-skip-url-encoding": true
2628
},
2729
{
2830
"name": "ApiVersion",

specification/cognitiveservices/data-plane/ContentSafety/stable/2023-10-01/contentsafety.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"in": "path",
2323
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://<resource-name>.cognitiveservices.azure.com).",
2424
"required": true,
25-
"type": "string"
25+
"type": "string",
26+
"format": "uri",
27+
"x-ms-skip-url-encoding": true
2628
}
2729
]
2830
},

specification/cognitiveservices/data-plane/ContentSafety/stable/2024-09-01/contentsafety.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"in": "path",
2323
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://<resource-name>.cognitiveservices.azure.com).",
2424
"required": true,
25-
"type": "string"
25+
"type": "string",
26+
"format": "uri",
27+
"x-ms-skip-url-encoding": true
2628
}
2729
]
2830
},

specification/communication/Communication.JobRouter/client.tsp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import "@azure-tools/typespec-client-generator-core";
33
import "@typespec/versioning";
44

55
import "./main.tsp";
6+
import "./models.tsp";
67

78
using Azure.ClientGenerator.Core;
89
using TypeSpec.Versioning;
@@ -142,3 +143,13 @@ interface JobRouterRestClient {
142143
@access(Access.internal, "csharp")
143144
listWorkers is AzureCommunicationRoutingService.JobRouterOperations.listWorkers;
144145
}
146+
147+
// Remove the leading "c" in the version enum identifiers for C#
148+
@@clientName(AzureCommunicationRoutingService.Versions.c2023_11_01,
149+
"2023_11_01",
150+
"csharp"
151+
);
152+
@@clientName(AzureCommunicationRoutingService.Versions.c2024_01_18_Preview,
153+
"2024_01_18_Preview",
154+
"csharp"
155+
);

specification/communication/Communication.JobRouter/main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using Azure.Core.Traits;
2020
"Azure Communication Routing Service",
2121
{
2222
@doc("Uri of your Communication resource")
23-
endpoint: string,
23+
endpoint: url,
2424
}
2525
)
2626
@versioned(Versions)

specification/communication/data-plane/JobRouter/preview/2024-01-18-preview/communicationservicejobrouter.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"in": "path",
2323
"description": "Uri of your Communication resource",
2424
"required": true,
25-
"type": "string"
25+
"type": "string",
26+
"format": "uri",
27+
"x-ms-skip-url-encoding": true
2628
}
2729
]
2830
},

specification/communication/data-plane/JobRouter/stable/2023-11-01/communicationservicejobrouter.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"in": "path",
2323
"description": "Uri of your Communication resource",
2424
"required": true,
25-
"type": "string"
25+
"type": "string",
26+
"format": "uri",
27+
"x-ms-skip-url-encoding": true
2628
}
2729
]
2830
},

specification/loadtestservice/data-plane/loadtesting/main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ using Azure.Core;
1515
"https://{endpoint}",
1616
"These APIs allow end users to create, view and run load tests using Azure Load Test Service.",
1717
{
18-
endpoint: string,
18+
endpoint: url,
1919
}
2020
)
2121
@doc("""

0 commit comments

Comments
 (0)