From 516cc928d9204b349cd96e160b5cbe6cd3f0b223 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 16 May 2025 10:26:57 -0700 Subject: [PATCH 1/4] First --- specification/ai/Azure.AI.Projects/client.tsp | 4 ---- specification/ai/Azure.AI.Projects/datasets/routes.tsp | 8 ++++---- specification/ai/Azure.AI.Projects/indexes/routes.tsp | 2 +- specification/ai/Azure.AI.Projects/servicepatterns.tsp | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/specification/ai/Azure.AI.Projects/client.tsp b/specification/ai/Azure.AI.Projects/client.tsp index f90a88b505a4..824baab5664e 100644 --- a/specification/ai/Azure.AI.Projects/client.tsp +++ b/specification/ai/Azure.AI.Projects/client.tsp @@ -33,7 +33,3 @@ using Azure.ClientGenerator.Core; // input parameter that calls either on these two. @@access(Azure.AI.Projects.Connections.get, Access.internal); @@access(Azure.AI.Projects.Connections.getWithCredentials, Access.internal); - -// For some reason for Python the emitter creates an empty ServicePatternsOperations operation -// class. Mark it as internal here. Apply to all languages just in case. -//@@access(Azure.AI.Projects.ServicePatterns, Access.internal); <== this did not work. It makes all methods internal. diff --git a/specification/ai/Azure.AI.Projects/datasets/routes.tsp b/specification/ai/Azure.AI.Projects/datasets/routes.tsp index d899cfad1df5..a5e70a86c074 100644 --- a/specification/ai/Azure.AI.Projects/datasets/routes.tsp +++ b/specification/ai/Azure.AI.Projects/datasets/routes.tsp @@ -17,14 +17,14 @@ alias ListDatasetVersionsParameters = {}; #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We are using service specific operation templates" @added(Versions.v2025_05_01) interface Datasets - extends ServicePatterns.VersionedOperations< + extends VersionedOperations< DatasetVersion, ListDatasetVersionsParameters, ListDatasetVersionsParameters > { @doc("Start a new or get an existing pending upload of a dataset for a specific version.") @Rest.action("startPendingUpload") - startPendingUploadVersion is ServicePatterns.VersionedResourceActionWithBody< + startPendingUploadVersion is VersionedResourceActionWithBody< DatasetVersion, PendingUploadRequest, PendingUploadResponse @@ -35,7 +35,7 @@ interface Datasets @Rest.actionSeparator("/") @Rest.action("startPendingUpload") @Http.post - startPendingUpload is ServicePatterns.UnversionedResourceAction< + startPendingUpload is UnversionedResourceAction< DatasetVersion, PendingUploadRequest, PendingUploadResponse @@ -48,7 +48,7 @@ interface Datasets @post @Rest.action("credentials") @Rest.actionSeparator("/") - getCredentials is ServicePatterns.VersionedResourceActionNoBody< + getCredentials is VersionedResourceActionNoBody< DatasetVersion, AssetCredentialResponse >; diff --git a/specification/ai/Azure.AI.Projects/indexes/routes.tsp b/specification/ai/Azure.AI.Projects/indexes/routes.tsp index 0ff537f47c20..e962747d2d10 100644 --- a/specification/ai/Azure.AI.Projects/indexes/routes.tsp +++ b/specification/ai/Azure.AI.Projects/indexes/routes.tsp @@ -15,7 +15,7 @@ alias ListIndexVersionParameters = {}; #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We are using service specific operation templates" @added(Versions.v2025_05_01) interface Indexes - extends ServicePatterns.VersionedOperations< + extends VersionedOperations< Index, ListIndexVersionParameters, ListIndexVersionParameters diff --git a/specification/ai/Azure.AI.Projects/servicepatterns.tsp b/specification/ai/Azure.AI.Projects/servicepatterns.tsp index 2dd4c36f9910..46f9b5b27829 100644 --- a/specification/ai/Azure.AI.Projects/servicepatterns.tsp +++ b/specification/ai/Azure.AI.Projects/servicepatterns.tsp @@ -2,7 +2,7 @@ import "@typespec/http"; import "@typespec/rest"; import "@azure-tools/typespec-azure-core"; -namespace Azure.AI.Projects.ServicePatterns { +namespace Azure.AI.Projects { @Rest.autoRoute interface VersionedOperations< TEntityType extends Reflection.Model, From c7f02183c56d9539034c3668a6e6cc8eeade55e9 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 16 May 2025 13:25:21 -0700 Subject: [PATCH 2/4] First --- .../ai/Azure.AI.Projects/servicepatterns.tsp | 272 +++++++++--------- .../2025-05-15-preview/azure-ai-projects.json | 120 +++++++- .../stable/2025-05-01/azure-ai-projects.json | 120 +++++++- .../stable/v1/azure-ai-projects.json | 120 +++++++- 4 files changed, 492 insertions(+), 140 deletions(-) diff --git a/specification/ai/Azure.AI.Projects/servicepatterns.tsp b/specification/ai/Azure.AI.Projects/servicepatterns.tsp index 46f9b5b27829..e43992d65089 100644 --- a/specification/ai/Azure.AI.Projects/servicepatterns.tsp +++ b/specification/ai/Azure.AI.Projects/servicepatterns.tsp @@ -2,162 +2,166 @@ import "@typespec/http"; import "@typespec/rest"; import "@azure-tools/typespec-azure-core"; -namespace Azure.AI.Projects { - @Rest.autoRoute - interface VersionedOperations< - TEntityType extends Reflection.Model, - TListLatestParameters extends Reflection.Model = {}, - TListVersionsParameters extends Reflection.Model = {} - > { - #suppress "@azure-tools/typespec-azure-core/verb-conflict" "We are using the resource action as a building block." - @doc("List all versions of the given {name}", TEntityType) - @Rest.action("versions") - @Rest.actionSeparator("/") - @Http.get - listVersions is BuildingBlocks.CoreOps.ResourceAction< - TEntityType, - TListVersionsParameters, - Azure.Core.Page - >; - - @doc("List the latest version of each {name}", TEntityType) - @Rest.listsResource(TEntityType) - listLatest is Azure.Core.Foundations.ResourceList< - TEntityType, - TListLatestParameters, - Azure.Core.Page - >; - - @doc("Get the specific version of the {name}", TEntityType) - getVersion is Azure.Core.Foundations.ResourceOperation< - TEntityType, - { - @doc("The specific version id of the {name} to retrieve.", TEntityType) - @Rest.segment("versions") - @Http.path - version: string; - }, - Azure.Core.Foundations.ResourceOkResponse - >; - - @doc("Delete the specific version of the {name}", TEntityType) - @Http.delete - deleteVersion is Azure.Core.Foundations.ResourceOperation< - TEntityType, - { - @doc("The version of the {name} to delete.", TEntityType) - @Rest.segment("versions") - @Http.path - version: string; - }, - Http.NoContentResponse - >; - - /* Reenable this once the service supports "unversioned" operations - @doc( - "Create a new {name}. The version id will be generated by the service.", - TEntityType - ) - @Rest.actionSeparator("/") - @Rest.action("versions") - @Http.post - create is BuildingBlocks.RepeatableCoreOps.ResourceAction< - TEntityType, - { - @doc("The definition of the {name} to create", TEntityType) - @Http.bodyRoot - body: TEntityType; - }, - TEntityType - >; - */ - - @doc( - "Create a new or update an existing {name} with the given version id", - TEntityType - ) - @Http.patch - createOrUpdateVersion is Azure.Core.Foundations.ResourceOperation< - TEntityType, - { - @doc("The definition of the {name} to create or update", TEntityType) - @Http.bodyRoot - body: TEntityType; - - @doc("Content type for patch") - @Http.header("Content-Type") - contentType: "application/merge-patch+json"; - - @doc( - "The specific version id of the {name} to create or replace.", - TEntityType - ) - @Rest.segment("versions") - @Http.path - version: string; - }, - Azure.Core.Foundations.ResourceCreatedOrOkResponse - >; - } - - @Rest.action - op VersionedResourceActionWithBody< - TEntityType extends Reflection.Model, - TParams, - TResponse - > is Azure.Core.Foundations.ResourceOperation< +namespace Azure.AI.Projects; + +alias CoreOps = Azure.Core.StandardResourceOperations; + +/* +alias RepeatableCoreOps = Azure.Core.ResourceOperations; +*/ + +@Rest.autoRoute +interface VersionedOperations< + TEntityType extends Reflection.Model, + TListLatestParameters extends Reflection.Model = {}, + TListVersionsParameters extends Reflection.Model = {} +> { + #suppress "@azure-tools/typespec-azure-core/verb-conflict" "We are using the resource action as a building block." + @doc("List all versions of the given {name}", TEntityType) + @Rest.action("versions") + @Rest.actionSeparator("/") + @Http.get + listVersions is CoreOps.ResourceAction< TEntityType, - { - @doc("Parameters for the action") - @Http.bodyRoot - body: TParams; + TListVersionsParameters, + Azure.Core.Page + >; - @doc("The specific version id of the {name} to operate on.", TEntityType) + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Suppress `Operation should be defined using a signature from the Azure.Core namespace.`" + @doc("List the latest version of each {name}", TEntityType) + @Rest.listsResource(TEntityType) + listLatest is Azure.Core.Foundations.ResourceList< + TEntityType, + TListLatestParameters, + Azure.Core.Page + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Suppress `Operation should be defined using a signature from the Azure.Core namespace.`" + @doc("Get the specific version of the {name}", TEntityType) + getVersion is Azure.Core.Foundations.ResourceOperation< + TEntityType, + { + @doc("The specific version id of the {name} to retrieve.", TEntityType) @Rest.segment("versions") @Http.path version: string; }, - TResponse + Azure.Core.Foundations.ResourceOkResponse >; - @Rest.action - op VersionedResourceActionNoBody< - TEntityType extends Reflection.Model, - TResponse - > is Azure.Core.Foundations.ResourceOperation< + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Suppress `Operation should be defined using a signature from the Azure.Core namespace.`" + @doc("Delete the specific version of the {name}", TEntityType) + @Http.delete + deleteVersion is Azure.Core.Foundations.ResourceOperation< TEntityType, { - @doc("The specific version id of the {name} to operate on.", TEntityType) + @doc("The version of the {name} to delete.", TEntityType) @Rest.segment("versions") @Http.path version: string; }, - TResponse + Http.NoContentResponse >; /* Reenable this once the service supports "unversioned" operations - @Rest.action - op UnversionedResourceAction< - TEntityType extends Reflection.Model, - TParams, - TResponse - > is Azure.Core.Foundations.ResourceOperation< + @doc( + "Create a new {name}. The version id will be generated by the service.", + TEntityType + ) + @Rest.actionSeparator("/") + @Rest.action("versions") + @Http.post + create is RepeatableCoreOps.ResourceAction< TEntityType, { - @doc("Parameters for the action") + @doc("The definition of the {name} to create", TEntityType) @Http.bodyRoot - body: TParams; + body: TEntityType; }, - TResponse + TEntityType >; */ - namespace BuildingBlocks { - alias CoreOps = Azure.Core.StandardResourceOperations; - /* - alias RepeatableCoreOps = Azure.Core.ResourceOperations; - */ - } + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Suppress `Operation should be defined using a signature from the Azure.Core namespace.`" + @doc( + "Create a new or update an existing {name} with the given version id", + TEntityType + ) + @Http.patch + createOrUpdateVersion is Azure.Core.Foundations.ResourceOperation< + TEntityType, + { + @doc("The definition of the {name} to create or update", TEntityType) + @Http.bodyRoot + body: TEntityType; + + @doc("Content type for patch") + @Http.header("Content-Type") + contentType: "application/merge-patch+json"; + + @doc( + "The specific version id of the {name} to create or replace.", + TEntityType + ) + @Rest.segment("versions") + @Http.path + version: string; + }, + Azure.Core.Foundations.ResourceCreatedOrOkResponse + >; } + +@Rest.action +op VersionedResourceActionWithBody< + TEntityType extends Reflection.Model, + TParams, + TResponse +> is Azure.Core.Foundations.ResourceOperation< + TEntityType, + { + @doc("Parameters for the action") + @Http.bodyRoot + body: TParams; + + @doc("The specific version id of the {name} to operate on.", TEntityType) + @Rest.segment("versions") + @Http.path + version: string; + }, + TResponse +>; + +@Rest.action +op VersionedResourceActionNoBody< + TEntityType extends Reflection.Model, + TResponse +> is Azure.Core.Foundations.ResourceOperation< + TEntityType, + { + @doc("The specific version id of the {name} to operate on.", TEntityType) + @Rest.segment("versions") + @Http.path + version: string; + }, + TResponse +>; + +/* Reenable this once the service supports "unversioned" operations +@Rest.action +op UnversionedResourceAction< + TEntityType extends Reflection.Model, + TParams, + TResponse +> is Azure.Core.Foundations.ResourceOperation< + TEntityType, + { + @doc("Parameters for the action") + @Http.bodyRoot + body: TParams; + }, + TResponse +>; +*/ + diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json index c9ee48da4370..db1103627d27 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersion" + "$ref": "#/definitions/DatasetVersionUpdate" } } ], @@ -1167,7 +1167,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/Index" + "$ref": "#/definitions/IndexUpdate" } } ], @@ -1852,6 +1852,16 @@ ], "x-ms-discriminator-value": "AzureSearch" }, + "AzureAISearchIndexUpdate": { + "type": "object", + "description": "Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "AzureSearch" + }, "AzureOpenAIModelConfiguration": { "type": "object", "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model.", @@ -2082,6 +2092,16 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, + "CosmosDBIndexUpdate": { + "type": "object", + "description": "CosmosDB Vector Store Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" + }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -2245,6 +2265,39 @@ "version" ] }, + "DatasetVersionUpdate": { + "type": "object", + "description": "DatasetVersion Definition", + "properties": { + "type": { + "$ref": "#/definitions/DatasetType", + "description": "Dataset type" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -2466,6 +2519,16 @@ ], "x-ms-discriminator-value": "uri_file" }, + "FileDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_file" + }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -2476,6 +2539,16 @@ ], "x-ms-discriminator-value": "uri_folder" }, + "FolderDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_folder" + }, "Index": { "type": "object", "description": "Index resource Definition", @@ -2555,6 +2628,39 @@ ] } }, + "IndexUpdate": { + "type": "object", + "description": "Index resource Definition", + "properties": { + "type": { + "$ref": "#/definitions/IndexType", + "description": "Type of index" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "InputData": { "type": "object", "description": "Abstract data class.", @@ -2610,6 +2716,16 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, + "ManagedAzureAISearchIndexUpdate": { + "type": "object", + "description": "Managed Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "ManagedAzureSearch" + }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json index 3f1dd6a8941b..57eccaa32a4d 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersion" + "$ref": "#/definitions/DatasetVersionUpdate" } } ], @@ -969,7 +969,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/Index" + "$ref": "#/definitions/IndexUpdate" } } ], @@ -1188,6 +1188,16 @@ ], "x-ms-discriminator-value": "AzureSearch" }, + "AzureAISearchIndexUpdate": { + "type": "object", + "description": "Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "AzureSearch" + }, "BaseCredentials": { "type": "object", "description": "A base class for connection credentials", @@ -1399,6 +1409,16 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, + "CosmosDBIndexUpdate": { + "type": "object", + "description": "CosmosDB Vector Store Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" + }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -1562,6 +1582,39 @@ "version" ] }, + "DatasetVersionUpdate": { + "type": "object", + "description": "DatasetVersion Definition", + "properties": { + "type": { + "$ref": "#/definitions/DatasetType", + "description": "Dataset type" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -1703,6 +1756,16 @@ ], "x-ms-discriminator-value": "uri_file" }, + "FileDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_file" + }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -1713,6 +1776,16 @@ ], "x-ms-discriminator-value": "uri_folder" }, + "FolderDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_folder" + }, "Index": { "type": "object", "description": "Index resource Definition", @@ -1792,6 +1865,39 @@ ] } }, + "IndexUpdate": { + "type": "object", + "description": "Index resource Definition", + "properties": { + "type": { + "$ref": "#/definitions/IndexType", + "description": "Type of index" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "ManagedAzureAISearchIndex": { "type": "object", "description": "Managed Azure AI Search Index Definition", @@ -1814,6 +1920,16 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, + "ManagedAzureAISearchIndexUpdate": { + "type": "object", + "description": "Managed Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "ManagedAzureSearch" + }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json index 26eff6ca54bb..25fc189ad970 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersion" + "$ref": "#/definitions/DatasetVersionUpdate" } } ], @@ -969,7 +969,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/Index" + "$ref": "#/definitions/IndexUpdate" } } ], @@ -1188,6 +1188,16 @@ ], "x-ms-discriminator-value": "AzureSearch" }, + "AzureAISearchIndexUpdate": { + "type": "object", + "description": "Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "AzureSearch" + }, "BaseCredentials": { "type": "object", "description": "A base class for connection credentials", @@ -1399,6 +1409,16 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, + "CosmosDBIndexUpdate": { + "type": "object", + "description": "CosmosDB Vector Store Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" + }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -1562,6 +1582,39 @@ "version" ] }, + "DatasetVersionUpdate": { + "type": "object", + "description": "DatasetVersion Definition", + "properties": { + "type": { + "$ref": "#/definitions/DatasetType", + "description": "Dataset type" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -1703,6 +1756,16 @@ ], "x-ms-discriminator-value": "uri_file" }, + "FileDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_file" + }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -1713,6 +1776,16 @@ ], "x-ms-discriminator-value": "uri_folder" }, + "FolderDatasetVersionUpdate": { + "type": "object", + "description": "FileDatasetVersion Definition", + "allOf": [ + { + "$ref": "#/definitions/DatasetVersionUpdate" + } + ], + "x-ms-discriminator-value": "uri_folder" + }, "Index": { "type": "object", "description": "Index resource Definition", @@ -1792,6 +1865,39 @@ ] } }, + "IndexUpdate": { + "type": "object", + "description": "Index resource Definition", + "properties": { + "type": { + "$ref": "#/definitions/IndexType", + "description": "Type of index" + }, + "description": { + "type": "string", + "description": "The asset description text.", + "x-ms-mutability": [ + "update", + "create" + ] + }, + "tags": { + "type": "object", + "description": "Tag dictionary. Tags can be added, removed, and updated.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "update", + "create" + ] + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, "ManagedAzureAISearchIndex": { "type": "object", "description": "Managed Azure AI Search Index Definition", @@ -1814,6 +1920,16 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, + "ManagedAzureAISearchIndexUpdate": { + "type": "object", + "description": "Managed Azure AI Search Index Definition", + "allOf": [ + { + "$ref": "#/definitions/IndexUpdate" + } + ], + "x-ms-discriminator-value": "ManagedAzureSearch" + }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", From f83fb2f7bbdf29da804c4b13f069a01fbf9a8c36 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 16 May 2025 17:12:01 -0700 Subject: [PATCH 3/4] Update swagger files after recopiling after tool update `npm ci` --- .../2025-05-15-preview/azure-ai-projects.json | 120 +----------------- .../stable/2025-05-01/azure-ai-projects.json | 120 +----------------- .../stable/v1/azure-ai-projects.json | 120 +----------------- 3 files changed, 6 insertions(+), 354 deletions(-) diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json index db1103627d27..c9ee48da4370 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersionUpdate" + "$ref": "#/definitions/DatasetVersion" } } ], @@ -1167,7 +1167,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/IndexUpdate" + "$ref": "#/definitions/Index" } } ], @@ -1852,16 +1852,6 @@ ], "x-ms-discriminator-value": "AzureSearch" }, - "AzureAISearchIndexUpdate": { - "type": "object", - "description": "Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "AzureSearch" - }, "AzureOpenAIModelConfiguration": { "type": "object", "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model.", @@ -2092,16 +2082,6 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, - "CosmosDBIndexUpdate": { - "type": "object", - "description": "CosmosDB Vector Store Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" - }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -2265,39 +2245,6 @@ "version" ] }, - "DatasetVersionUpdate": { - "type": "object", - "description": "DatasetVersion Definition", - "properties": { - "type": { - "$ref": "#/definitions/DatasetType", - "description": "Dataset type" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -2519,16 +2466,6 @@ ], "x-ms-discriminator-value": "uri_file" }, - "FileDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_file" - }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -2539,16 +2476,6 @@ ], "x-ms-discriminator-value": "uri_folder" }, - "FolderDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_folder" - }, "Index": { "type": "object", "description": "Index resource Definition", @@ -2628,39 +2555,6 @@ ] } }, - "IndexUpdate": { - "type": "object", - "description": "Index resource Definition", - "properties": { - "type": { - "$ref": "#/definitions/IndexType", - "description": "Type of index" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "InputData": { "type": "object", "description": "Abstract data class.", @@ -2716,16 +2610,6 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, - "ManagedAzureAISearchIndexUpdate": { - "type": "object", - "description": "Managed Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "ManagedAzureSearch" - }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json index 57eccaa32a4d..3f1dd6a8941b 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersionUpdate" + "$ref": "#/definitions/DatasetVersion" } } ], @@ -969,7 +969,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/IndexUpdate" + "$ref": "#/definitions/Index" } } ], @@ -1188,16 +1188,6 @@ ], "x-ms-discriminator-value": "AzureSearch" }, - "AzureAISearchIndexUpdate": { - "type": "object", - "description": "Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "AzureSearch" - }, "BaseCredentials": { "type": "object", "description": "A base class for connection credentials", @@ -1409,16 +1399,6 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, - "CosmosDBIndexUpdate": { - "type": "object", - "description": "CosmosDB Vector Store Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" - }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -1582,39 +1562,6 @@ "version" ] }, - "DatasetVersionUpdate": { - "type": "object", - "description": "DatasetVersion Definition", - "properties": { - "type": { - "$ref": "#/definitions/DatasetType", - "description": "Dataset type" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -1756,16 +1703,6 @@ ], "x-ms-discriminator-value": "uri_file" }, - "FileDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_file" - }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -1776,16 +1713,6 @@ ], "x-ms-discriminator-value": "uri_folder" }, - "FolderDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_folder" - }, "Index": { "type": "object", "description": "Index resource Definition", @@ -1865,39 +1792,6 @@ ] } }, - "IndexUpdate": { - "type": "object", - "description": "Index resource Definition", - "properties": { - "type": { - "$ref": "#/definitions/IndexType", - "description": "Type of index" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "ManagedAzureAISearchIndex": { "type": "object", "description": "Managed Azure AI Search Index Definition", @@ -1920,16 +1814,6 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, - "ManagedAzureAISearchIndexUpdate": { - "type": "object", - "description": "Managed Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "ManagedAzureSearch" - }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json index 25fc189ad970..26eff6ca54bb 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects.json @@ -456,7 +456,7 @@ "description": "The definition of the DatasetVersion to create or update", "required": true, "schema": { - "$ref": "#/definitions/DatasetVersionUpdate" + "$ref": "#/definitions/DatasetVersion" } } ], @@ -969,7 +969,7 @@ "description": "The definition of the Index to create or update", "required": true, "schema": { - "$ref": "#/definitions/IndexUpdate" + "$ref": "#/definitions/Index" } } ], @@ -1188,16 +1188,6 @@ ], "x-ms-discriminator-value": "AzureSearch" }, - "AzureAISearchIndexUpdate": { - "type": "object", - "description": "Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "AzureSearch" - }, "BaseCredentials": { "type": "object", "description": "A base class for connection credentials", @@ -1409,16 +1399,6 @@ ], "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" }, - "CosmosDBIndexUpdate": { - "type": "object", - "description": "CosmosDB Vector Store Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "CosmosDBNoSqlVectorStore" - }, "CredentialType": { "type": "string", "description": "The credential type used by the connection", @@ -1582,39 +1562,6 @@ "version" ] }, - "DatasetVersionUpdate": { - "type": "object", - "description": "DatasetVersion Definition", - "properties": { - "type": { - "$ref": "#/definitions/DatasetType", - "description": "Dataset type" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "Deployment": { "type": "object", "description": "Model Deployment Definition", @@ -1756,16 +1703,6 @@ ], "x-ms-discriminator-value": "uri_file" }, - "FileDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_file" - }, "FolderDatasetVersion": { "type": "object", "description": "FileDatasetVersion Definition", @@ -1776,16 +1713,6 @@ ], "x-ms-discriminator-value": "uri_folder" }, - "FolderDatasetVersionUpdate": { - "type": "object", - "description": "FileDatasetVersion Definition", - "allOf": [ - { - "$ref": "#/definitions/DatasetVersionUpdate" - } - ], - "x-ms-discriminator-value": "uri_folder" - }, "Index": { "type": "object", "description": "Index resource Definition", @@ -1865,39 +1792,6 @@ ] } }, - "IndexUpdate": { - "type": "object", - "description": "Index resource Definition", - "properties": { - "type": { - "$ref": "#/definitions/IndexType", - "description": "Type of index" - }, - "description": { - "type": "string", - "description": "The asset description text.", - "x-ms-mutability": [ - "update", - "create" - ] - }, - "tags": { - "type": "object", - "description": "Tag dictionary. Tags can be added, removed, and updated.", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "update", - "create" - ] - } - }, - "discriminator": "type", - "required": [ - "type" - ] - }, "ManagedAzureAISearchIndex": { "type": "object", "description": "Managed Azure AI Search Index Definition", @@ -1920,16 +1814,6 @@ ], "x-ms-discriminator-value": "ManagedAzureSearch" }, - "ManagedAzureAISearchIndexUpdate": { - "type": "object", - "description": "Managed Azure AI Search Index Definition", - "allOf": [ - { - "$ref": "#/definitions/IndexUpdate" - } - ], - "x-ms-discriminator-value": "ManagedAzureSearch" - }, "ModelDeployment": { "type": "object", "description": "Model Deployment Definition", From f78812a139529aa86667fdded4849b73873e6082 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Fri, 16 May 2025 17:31:54 -0700 Subject: [PATCH 4/4] Fix format --- specification/ai/Azure.AI.Projects/servicepatterns.tsp | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/ai/Azure.AI.Projects/servicepatterns.tsp b/specification/ai/Azure.AI.Projects/servicepatterns.tsp index e43992d65089..5f4d87d83196 100644 --- a/specification/ai/Azure.AI.Projects/servicepatterns.tsp +++ b/specification/ai/Azure.AI.Projects/servicepatterns.tsp @@ -164,4 +164,3 @@ op UnversionedResourceAction< TResponse >; */ -