Repository: Azure/azure-rest-api-specs
Pull request #33566: Address some additional TypeSpec issues
Author: login: dargilco
Labels: name: data-plane
name: TypeSpec
description: Authored with TypeSpec
Created: 2025-03-28T15:52:05Z | Merged: 2025-03-28T21:49:31Z

1) Add `AuthType` property on the Connection object. Values were copied from the TypeSpec we currently use (`feature/azure-ai-projects` branch)

2) Align on the names of operators with version and without version. Before this PR we have:
[/datasets and /indexes] createVersion
[/datasets and /indexes] create
[/datasets] startPendingUpload
[/datasets] startPendingUploadAutoIncrement

This PR updates the above two to the following:
[datasets] startPendingUploadVersion
[datasets] startPendingUpload

Such that we are consistent -- operator names that require the caller to specify a version end with "Version".  Operator names that do not required a version (it's auto-generated by the service) will not have "Version" at the end.

3) In the /deployment "list" operator, remove the option to include models deployed to connections. Since that will not be ready for build.


Diff:
diff --git a/specification/ai/Azure.AI.Projects/connections/models.tsp b/specification/ai/Azure.AI.Projects/connections/models.tsp
index 000960253525..d2119b8dbea0 100644
--- a/specification/ai/Azure.AI.Projects/connections/models.tsp
+++ b/specification/ai/Azure.AI.Projects/connections/models.tsp
@@ -26,6 +26,9 @@ model Connection {
   @visibility(Lifecycle.Read)
   target: string;
 
+  @doc("The authentication type used by the connection")
+  authType: AuthenticationType;
+
   @doc("Metadata of the connection")
   metadata: Record<string>;
 }
@@ -56,3 +59,23 @@ union ConnectionType {
   @doc("Custom Keys")
   Custom: "CustomKeys",
 }
+
+@doc("The authentication type used by the connection")
+union AuthenticationType {
+  string,
+
+  @doc("API Key authentication")
+  apiKey: "ApiKey",
+
+  @doc("Entra ID authentication (formerly known as AAD)")
+  entraId: "AAD",
+
+  @doc("Shared Access Signature (SAS) authentication")
+  SAS: "SAS",
+
+  @doc("Custom authentication")
+  custom: "CustomKeys",
+
+  @doc("No authentication")
+  None: "None",
+}
diff --git a/specification/ai/Azure.AI.Projects/datasets/routes.tsp b/specification/ai/Azure.AI.Projects/datasets/routes.tsp
index db779a38fd34..5722831d8609 100644
--- a/specification/ai/Azure.AI.Projects/datasets/routes.tsp
+++ b/specification/ai/Azure.AI.Projects/datasets/routes.tsp
@@ -37,17 +37,17 @@ interface Datasets
       ListDatasetVersionsParameters
     > {
   @doc("Create or start a pending upload of a dataset for a specific version.")
-  startPendingUpload is ServicePatterns.VersionedResourceAction<
+  startPendingUploadVersion is ServicePatterns.VersionedResourceAction<
     DatasetVersion,
     PendingUploadRequest,
     PendingUploadResponse
   >;
 
-  @doc("Create or start a pending upload of a dataset. The dataset version will be generated by service.")
+  @doc("Create or start a pending upload of a dataset. The version id will be generated by the service.")
   @Rest.actionSeparator("/")
   @Rest.action("startPendingUpload")
   @Http.post
-  startPendingUploadAutoIncrement is ServicePatterns.UnversionedResourceAction<
+  startPendingUpload is ServicePatterns.UnversionedResourceAction<
     DatasetVersion,
     PendingUploadRequest,
     PendingUploadResponse
diff --git a/specification/ai/Azure.AI.Projects/deployments/routes.tsp b/specification/ai/Azure.AI.Projects/deployments/routes.tsp
index 39168cdc4729..02eeca896129 100644
--- a/specification/ai/Azure.AI.Projects/deployments/routes.tsp
+++ b/specification/ai/Azure.AI.Projects/deployments/routes.tsp
@@ -32,10 +32,6 @@ interface Deployments {
       @query("modelName")
       modelName?: string;
 
-      @doc("Flag to include models from connections in response.")
-      @query("includeConnectedModels")
-      includeConnectionModels?: boolean;
-
       ...StandardListQueryParameters;
     }>
   >;
diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json
index 0826798b52a1..e30fccd15274 100644
--- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json
+++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json
@@ -568,8 +568,8 @@
     },
     "/datasets/{name}/startPendingUpload": {
       "post": {
-        "operationId": "Datasets_StartPendingUploadAutoIncrement",
-        "description": "Create or start a pending upload of a dataset. The dataset version will be generated by service.",
+        "operationId": "Datasets_StartPendingUpload",
+        "description": "Create or start a pending upload of a dataset. The version id will be generated by the service.",
         "parameters": [
           {
             "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
@@ -937,9 +937,9 @@
         }
       }
     },
-    "/datasets/{name}/versions/{version}/startPendingUpload": {
+    "/datasets/{name}/versions/{version}/startPendingUploadVersion": {
       "post": {
-        "operationId": "Datasets_StartPendingUpload",
+        "operationId": "Datasets_StartPendingUploadVersion",
         "description": "Create or start a pending upload of a dataset for a specific version.",
         "parameters": [
           {
@@ -1013,14 +1013,6 @@
             "required": false,
             "type": "string"
           },
-          {
-            "name": "includeConnectedModels",
-            "in": "query",
-            "description": "Flag to include models from connections in response.",
-            "required": false,
-            "type": "boolean",
-            "x-ms-client-name": "includeConnectionModels"
-          },
           {
             "$ref": "#/parameters/Azure.Core.TopQueryParameter"
           },
@@ -9708,6 +9700,48 @@
       }
     },
     "AssistantsApiResponseFormatOption": {},
+    "AuthenticationType": {
+      "type": "string",
+      "description": "The authentication type used by the connection",
+      "enum": [
+        "ApiKey",
+        "AAD",
+        "SAS",
+        "CustomKeys",
+        "None"
+      ],
+      "x-ms-enum": {
+        "name": "AuthenticationType",
+        "modelAsString": true,
+        "values": [
+          {
+            "name": "apiKey",
+            "value": "ApiKey",
+            "description": "API Key authentication"
+          },
+          {
+            "name": "entraId",
+            "value": "AAD",
+            "description": "Entra ID authentication (formerly known as AAD)"
+          },
+          {
+            "name": "SAS",
+            "value": "SAS",
+            "description": "Shared Access Signature (SAS) authentication"
+          },
+          {
+            "name": "custom",
+            "value": "CustomKeys",
+            "description": "Custom authentication"
+          },
+          {
+            "name": "None",
+            "value": "None",
+            "description": "No authentication"
+          }
+        ]
+      }
+    },
     "Azure.Core.Foundations.Error": {
       "type": "object",
       "description": "The error object.",
@@ -9850,6 +9884,10 @@
           "description": "The connection URL to be used for this service",
           "readOnly": true
         },
+        "authType": {
+          "$ref": "#/definitions/AuthenticationType",
+          "description": "The authentication type used by the connection"
+        },
         "metadata": {
           "type": "object",
           "description": "Metadata of the connection",
@@ -9862,6 +9900,7 @@
         "name",
         "type",
         "target",
+        "authType",
         "metadata"
       ]
     },


Reviews:
user: login: needuv
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-28T17:45:53Z
user: login: JeffreyRichter
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-28T19:00:32Z
user: login: dargilco
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-28T21:49:21Z

Review comments:
diff_hunk: @@ -56,3 +59,23 @@ union ConnectionType {
   @doc("Custom Keys")
   Custom: "CustomKeys",
 }
+
+@doc("The authentication type used by the connection")
+union AuthenticationType {
+  string,
+
+  @doc("API Key authentication")
path: specification/ai/Azure.AI.Projects/connections/models.tsp
user: login: JeffreyRichter
body: Due to Microsoft's SFI initiative, Azure services are supposed to support only Entra ID now and NOT support api-key or SAS (unless it is delegated SAS). If you need to support api-key or non-delegated SAS for getting-started scenarios (but not for customer long-term production use scenarios), then a short expiration (perhaps a week or so) on the key/sas is required.
created_at: 2025-03-28T19:00:32Z
author_association: MEMBER
diff_hunk: @@ -56,3 +59,23 @@ union ConnectionType {
   @doc("Custom Keys")
   Custom: "CustomKeys",
 }
+
+@doc("The authentication type used by the connection")
+union AuthenticationType {
+  string,
+
+  @doc("API Key authentication")
path: specification/ai/Azure.AI.Projects/connections/models.tsp
user: login: dargilco
body: @JeffreyRichter thanks for the note, I'll follow up with you offline on this.
created_at: 2025-03-28T21:49:21Z
author_association: MEMBER

PR comments:
user: login: openapi-pipeline-app[bot]
created_at: 2025-03-28T15:52:09Z
body: <h2>Next Steps to Merge</h2>✅ All automated merging requirements have been met! To get your PR merged, see <a href="https://aka.ms/azsdk/specreview/merge">aka.ms/azsdk/specreview/merge</a>.
author_association: NONE
user: login: openapi-pipeline-app[bot]
created_at: 2025-03-28T15:52:09Z
body: PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.
author_association: NONE
user: login: azure-sdk
created_at: 2025-03-28T15:57:41Z
body: **API change check**

APIView has identified API level changes in this PR and created following API reviews.

[Azure.AI.Projects](https://apiview.dev/Assemblies/Review/2d95fc27d5b8484a8600b3f00af0901f?revisionId=0ffe04c01c234ddba127adb0a74b5ee5)


author_association: COLLABORATOR