diff --git a/specification/ai/Azure.AI.Projects/client.tsp b/specification/ai/Azure.AI.Projects/client.tsp index 1428265619ad..f90a88b505a4 100644 --- a/specification/ai/Azure.AI.Projects/client.tsp +++ b/specification/ai/Azure.AI.Projects/client.tsp @@ -4,3 +4,36 @@ import "./main.tsp"; using Azure.ClientGenerator.Core; @@clientName(Azure.AI.Projects, "AIProjectClient"); + +// Shorter method names for SDK datasets operations +@@clientName(Azure.AI.Projects.Datasets.listLatest, "list"); +@@clientName(Azure.AI.Projects.Datasets.getVersion, "get"); +@@clientName(Azure.AI.Projects.Datasets.deleteVersion, "delete"); +@@clientName(Azure.AI.Projects.Datasets.createOrUpdateVersion, + "createOrUpdate" +); +@@clientName(Azure.AI.Projects.Datasets.startPendingUploadVersion, + "pendingUpload" +); + +// Shorter method names for SDK Index operations +@@clientName(Azure.AI.Projects.Indexes.listLatest, "list"); +@@clientName(Azure.AI.Projects.Indexes.getVersion, "get"); +@@clientName(Azure.AI.Projects.Indexes.deleteVersion, "delete"); +@@clientName(Azure.AI.Projects.Indexes.createOrUpdateVersion, "createOrUpdate"); + +// In Python, the emitter changes "keys" to "keys_property", since there is already +// a "keys" method in the generated code due to usage of MutableMapping. Call it credential_keys instead. +@@clientName(Azure.AI.Projects.CustomCredential.keys, + "credential_keys", + "python" +); + +// Make these two internal, since all SDKs hand-write a single public method with boolean "includeCredentials" +// 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/connections/models.tsp b/specification/ai/Azure.AI.Projects/connections/models.tsp index 57ec759cea54..2c968865b2c0 100644 --- a/specification/ai/Azure.AI.Projects/connections/models.tsp +++ b/specification/ai/Azure.AI.Projects/connections/models.tsp @@ -68,7 +68,7 @@ model EntraIDCredentials extends BaseCredentials { type: CredentialType.entraId; } -@doc("Custom credential defintion") +@doc("Custom credential definition") model CustomCredential extends BaseCredentials { @doc("The credential type") @visibility(Lifecycle.Read) diff --git a/specification/ai/Azure.AI.Projects/datasets/routes.tsp b/specification/ai/Azure.AI.Projects/datasets/routes.tsp index cbf22eba4739..dc283e2a7c79 100644 --- a/specification/ai/Azure.AI.Projects/datasets/routes.tsp +++ b/specification/ai/Azure.AI.Projects/datasets/routes.tsp @@ -60,7 +60,7 @@ interface Datasets #suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" #suppress "@azure-tools/typespec-azure-core/use-standard-operations" - @doc("Get download sas for dataset version.") + @doc("Get the SAS credential to access the storage account associated with a Dataset version.") @post @Rest.action("credentials") @Rest.actionSeparator("/") diff --git a/specification/ai/Azure.AI.Projects/servicepatterns.tsp b/specification/ai/Azure.AI.Projects/servicepatterns.tsp index 376184787b32..35e53d56c8c0 100644 --- a/specification/ai/Azure.AI.Projects/servicepatterns.tsp +++ b/specification/ai/Azure.AI.Projects/servicepatterns.tsp @@ -80,6 +80,10 @@ namespace Azure.AI.Projects.ServicePatterns { createOrUpdateVersion is Azure.Core.Foundations.ResourceOperation< TEntityType, { + @doc("The definition of the {name} to create or update", TEntityType) + @Http.bodyRoot + body: TEntityType; + @doc( "The specific version id of the {name} to create or replace.", TEntityType @@ -87,10 +91,6 @@ namespace Azure.AI.Projects.ServicePatterns { @Rest.segment("versions") @Http.path version: string; - - @doc("The definition of the {name} to create or update", TEntityType) - @Http.bodyRoot - body: TEntityType; }, Azure.Core.Foundations.ResourceCreatedOrOkResponse >; @@ -104,14 +104,14 @@ namespace Azure.AI.Projects.ServicePatterns { > 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; - - @doc("Parameters for the action") - @Http.bodyRoot - body: TParams; }, TResponse >; @@ -135,8 +135,10 @@ namespace Azure.AI.Projects.ServicePatterns { namespace BuildingBlocks { alias CoreOps = Azure.Core.StandardResourceOperations; + /* alias RepeatableCoreOps = Azure.Core.ResourceOperations; + */ } } diff --git a/specification/ai/Azure.AI.Projects/suppressions.yaml b/specification/ai/Azure.AI.Projects/suppressions.yaml index a816f7f88a71..0c482b38e9ad 100644 --- a/specification/ai/Azure.AI.Projects/suppressions.yaml +++ b/specification/ai/Azure.AI.Projects/suppressions.yaml @@ -12,4 +12,6 @@ # Suppress JS package & dir names related to RLC, which require "rest" in the name. We do not use RLC. - options.@azure-tools/typespec-ts.package-dir - options.@azure-tools/typespec-ts.package-details.name - reason: 'We do not yet have a Go client library. We do not use RLC for JS.' + # Do not force me to generate Python samples + - options.@azure-tools/typespec-python.generate-sample + reason: 'See above comments for details' diff --git a/specification/ai/Azure.AI.Projects/tspconfig.yaml b/specification/ai/Azure.AI.Projects/tspconfig.yaml index 582b8fb2ea7a..b4bb1ea518e8 100644 --- a/specification/ai/Azure.AI.Projects/tspconfig.yaml +++ b/specification/ai/Azure.AI.Projects/tspconfig.yaml @@ -17,7 +17,7 @@ options: api-version: "2025-05-15-preview" flavor: azure generate-test: true - generate-sample: true + generate-sample: false "@azure-tools/typespec-csharp": package-mode: "dataplane" package-dir: "Azure.AI.Projects" diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json index 8b0259804ddd..4f0f9d90e970 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json @@ -663,7 +663,7 @@ "/datasets/{name}/versions/{version}/credentials": { "post": { "operationId": "Datasets_GetCredentials", - "description": "Get download sas for dataset version.", + "description": "Get the SAS credential to access the storage account associated with a Dataset version.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -2379,7 +2379,7 @@ }, "CustomCredential": { "type": "object", - "description": "Custom credential defintion", + "description": "Custom credential definition", "properties": { "keys": { "type": "object", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json index 6ec38b170bae..6828e8cba4f4 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json @@ -663,7 +663,7 @@ "/datasets/{name}/versions/{version}/credentials": { "post": { "operationId": "Datasets_GetCredentials", - "description": "Get download sas for dataset version.", + "description": "Get the SAS credential to access the storage account associated with a Dataset version.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -1683,7 +1683,7 @@ }, "CustomCredential": { "type": "object", - "description": "Custom credential defintion", + "description": "Custom credential definition", "properties": { "keys": { "type": "object", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects-1dp.json index 9ce7570bddfa..72d868f6dc04 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/v1/azure-ai-projects-1dp.json @@ -663,7 +663,7 @@ "/datasets/{name}/versions/{version}/credentials": { "post": { "operationId": "Datasets_GetCredentials", - "description": "Get download sas for dataset version.", + "description": "Get the SAS credential to access the storage account associated with a Dataset version.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -1683,7 +1683,7 @@ }, "CustomCredential": { "type": "object", - "description": "Custom credential defintion", + "description": "Custom credential definition", "properties": { "keys": { "type": "object",