Skip to content

Commit 7f9a4b3

Browse files
dargilcodanieljurek
authored andcommitted
Client library customization of input param name when creating a Dataset or Index (instead of generic variable name "body") (#35235)
1 parent be662e1 commit 7f9a4b3

File tree

42 files changed

+106
-169
lines changed

Some content is hidden

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

42 files changed

+106
-169
lines changed

specification/ai/Azure.AI.Projects/datasets/routes.tsp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,41 @@ alias ListDatasetVersionsParameters = {};
1919
interface Datasets
2020
extends VersionedOperations<
2121
DatasetVersion,
22+
InputParameters<DatasetVersion, "datasetVersion">,
2223
ListDatasetVersionsParameters,
2324
ListDatasetVersionsParameters
2425
> {
2526
@doc("Start a new or get an existing pending upload of a dataset for a specific version.")
2627
@Rest.action("startPendingUpload")
27-
startPendingUploadVersion is VersionedResourceActionWithBody<
28+
startPendingUploadVersion is Azure.Core.Foundations.ResourceOperation<
2829
DatasetVersion,
29-
PendingUploadRequest,
30-
PendingUploadResponse
31-
>;
30+
{
31+
@doc("The pending upload request parameters")
32+
@Http.bodyRoot
33+
pendingUploadRequest: PendingUploadRequest;
3234

33-
/* Reenable this once the service supports "unversioned" dataset operations
34-
@doc("Start a new pending upload for a dataset. The version id will be generated by the service.")
35-
@Rest.actionSeparator("/")
36-
@Rest.action("startPendingUpload")
37-
@Http.post
38-
startPendingUpload is UnversionedResourceAction<
39-
DatasetVersion,
40-
PendingUploadRequest,
35+
@doc("The specific version id of the DatasetVersion to operate on.")
36+
@Rest.segment("versions")
37+
@Http.path
38+
version: string;
39+
},
4140
PendingUploadResponse
4241
>;
43-
*/
4442

4543
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version"
4644
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
4745
@doc("Get the SAS credential to access the storage account associated with a Dataset version.")
4846
@post
4947
@Rest.action("credentials")
5048
@Rest.actionSeparator("/")
51-
getCredentials is VersionedResourceActionNoBody<
49+
getCredentials is Azure.Core.Foundations.ResourceOperation<
5250
DatasetVersion,
51+
{
52+
@doc("The specific version id of the DatasetVersion to operate on.")
53+
@Rest.segment("versions")
54+
@Http.path
55+
version: string;
56+
},
5357
AssetCredentialResponse
5458
>;
5559
}

specification/ai/Azure.AI.Projects/examples/2025-05-01/Datasets_CreateOrUpdateVersion_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "grpenjfobadxmsceuqwunwqn",
77
"version": "dfo",
8-
"body": {
8+
"datasetVersion": {
99
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
1010
"type": "DatasetVersion",
1111
"description": "zukluwbmoq",

specification/ai/Azure.AI.Projects/examples/2025-05-01/Datasets_CreateOrUpdateVersion_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "rpnyigsqddnpdmrboazyi",
77
"version": "iplgbfirylwervrnglnnbwwzodsm",
8-
"body": {
8+
"datasetVersion": {
99
"type": "DatasetVersion",
1010
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]"
1111
}

specification/ai/Azure.AI.Projects/examples/2025-05-01/Datasets_StartPendingUploadVersion_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "hvusmygqjnkihfwprkw",
77
"version": "zcrxyums",
8-
"body": {
8+
"pendingUploadRequest": {
99
"pendingUploadId": "cnvf",
1010
"connectionName": "qepjjlfgjlcalfuhchnojqlzhzrtcj",
1111
"pendingUploadType": "BlobReference"

specification/ai/Azure.AI.Projects/examples/2025-05-01/Datasets_StartPendingUploadVersion_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "esicohztsytnvxxqcpzsxnesug",
77
"version": "rrwerwxmkfuewptwsxeylxrcjkcp",
8-
"body": {
8+
"pendingUploadRequest": {
99
"pendingUploadType": "BlobReference"
1010
}
1111
},

specification/ai/Azure.AI.Projects/examples/2025-05-01/Indexes_CreateOrUpdateVersion_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "qlslwpztrobxh",
77
"version": "lvwrjftywgtfixhxoxbmcs",
8-
"body": {
8+
"index": {
99
"type": "Index",
1010
"description": "fvbkomalkxkj",
1111
"tags": {

specification/ai/Azure.AI.Projects/examples/2025-05-01/Indexes_CreateOrUpdateVersion_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-01",
66
"name": "ypkrjjvche",
77
"version": "gmorfjnfnwawvkwsjsodunylq",
8-
"body": {
8+
"index": {
99
"type": "Index"
1010
}
1111
},

specification/ai/Azure.AI.Projects/examples/2025-05-15-preview/Datasets_CreateOrUpdateVersion_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-15-preview",
66
"name": "vfupg",
77
"version": "ecacrnqtmggfqsocagocpf",
8-
"body": {
8+
"datasetVersion": {
99
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
1010
"type": "DatasetVersion",
1111
"description": "u",

specification/ai/Azure.AI.Projects/examples/2025-05-15-preview/Datasets_CreateOrUpdateVersion_MinimumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-15-preview",
66
"name": "ryqozexodzklgkffokixpftfkcy",
77
"version": "vldbiveryfmysxuzw",
8-
"body": {
8+
"datasetVersion": {
99
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
1010
"type": "DatasetVersion"
1111
}

specification/ai/Azure.AI.Projects/examples/2025-05-15-preview/Datasets_StartPendingUploadVersion_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-05-15-preview",
66
"name": "sgrzyrpltz",
77
"version": "ozdqisviavgqgfbtnzk",
8-
"body": {
8+
"pendingUploadRequest": {
99
"pendingUploadId": "mxjahcghabuplfwtlopiqgxtcyw",
1010
"connectionName": "bknvpmlisrqxaphkf",
1111
"pendingUploadType": "BlobReference"

0 commit comments

Comments
 (0)