Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove List Query Params, Remove Body from Dataset Get Credentials
  • Loading branch information
Neehar Duvvuri authored and Neehar Duvvuri committed May 6, 2025
commit ce31cee7c52c370d7cb8d7835a436babf9ab9d82
12 changes: 3 additions & 9 deletions specification/ai/Azure.AI.Projects/datasets/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ using TypeSpec.Versioning;

namespace Azure.AI.Projects;

alias ListDatasetVersionsParameters = {
@doc("Continuation token for pagination.")
@query
@continuationToken
continuationToken?: string;
};
alias ListDatasetVersionsParameters = {};

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We are using service specific operation templates"
@added(Versions.v2025_05_01)
Expand All @@ -29,7 +24,7 @@ interface Datasets
> {
@doc("Start a new or get an existing pending upload of a dataset for a specific version.")
@Rest.action("startPendingUpload")
startPendingUploadVersion is ServicePatterns.VersionedResourceAction<
startPendingUploadVersion is ServicePatterns.VersionedResourceActionWithBody<
DatasetVersion,
PendingUploadRequest,
PendingUploadResponse
Expand All @@ -53,9 +48,8 @@ interface Datasets
@post
@Rest.action("credentials")
@Rest.actionSeparator("/")
getCredentials is ServicePatterns.VersionedResourceAction<
getCredentials is ServicePatterns.VersionedResourceActionNoBody<
DatasetVersion,
{},
AssetCredentialResponse
>;
}
2 changes: 0 additions & 2 deletions specification/ai/Azure.AI.Projects/deployments/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ interface Deployments {
@doc("Type of deployment to filter list by")
@query("deploymentType")
deploymentType?: DeploymentType;

...StandardListQueryParameters;
}>
>;
}
5 changes: 1 addition & 4 deletions specification/ai/Azure.AI.Projects/evaluations/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ interface Evaluations {
get is EvaluationsOperations.ResourceRead<Evaluation>;

@doc("List evaluation runs")
list is EvaluationsOperations.ResourceList<
Evaluation,
ListQueryParametersTrait<StandardListQueryParameters>
>;
list is EvaluationsOperations.ResourceList<Evaluation>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@doc("Creates an evaluation run.")
Expand Down
8 changes: 1 addition & 7 deletions specification/ai/Azure.AI.Projects/indexes/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ import "./models.tsp";
import "../servicepatterns.tsp";
import "../common/models.tsp";

using TypeSpec.Http;
using TypeSpec.Versioning;

namespace Azure.AI.Projects;

alias ListIndexVersionParameters = {
@doc("Continuation token for pagination.")
@query
@continuationToken
continuationToken?: string;
};
alias ListIndexVersionParameters = {};

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We are using service specific operation templates"
@added(Versions.v2025_05_01)
Expand Down
5 changes: 1 addition & 4 deletions specification/ai/Azure.AI.Projects/red-teams/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ interface RedTeams {
get is RedTeamOperations.ResourceRead<RedTeam>;

@doc("List a redteam by name.")
list is RedTeamOperations.ResourceList<
RedTeam,
ListQueryParametersTrait<StandardListQueryParameters>
>;
list is RedTeamOperations.ResourceList<RedTeam>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@doc("Creates a redteam run.")
Expand Down
17 changes: 16 additions & 1 deletion specification/ai/Azure.AI.Projects/servicepatterns.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace Azure.AI.Projects.ServicePatterns {
}

@Rest.action
op VersionedResourceAction<
op VersionedResourceActionWithBody<
TEntityType extends Reflection.Model,
TParams,
TResponse
Expand All @@ -120,6 +120,21 @@ namespace Azure.AI.Projects.ServicePatterns {
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<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,6 @@
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -355,13 +348,6 @@
"description": "The name of the resource",
"required": true,
"type": "string"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -588,15 +574,6 @@
"description": "The specific version id of the DatasetVersion to operate on.",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"description": "Parameters for the action",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
Expand Down Expand Up @@ -734,15 +711,6 @@
]
}
},
{
"$ref": "#/parameters/Azure.Core.TopQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.SkipQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.ClientRequestIdHeader"
}
Expand Down Expand Up @@ -845,15 +813,6 @@
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"$ref": "#/parameters/Azure.Core.TopQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.SkipQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.ClientRequestIdHeader"
}
Expand Down Expand Up @@ -1051,13 +1010,6 @@
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -1107,13 +1059,6 @@
"description": "The name of the resource",
"required": true,
"type": "string"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -1327,15 +1272,6 @@
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"$ref": "#/parameters/Azure.Core.TopQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.SkipQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.ClientRequestIdHeader"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,6 @@
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -355,13 +348,6 @@
"description": "The name of the resource",
"required": true,
"type": "string"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -588,15 +574,6 @@
"description": "The specific version id of the DatasetVersion to operate on.",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"description": "Parameters for the action",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
Expand Down Expand Up @@ -734,15 +711,6 @@
]
}
},
{
"$ref": "#/parameters/Azure.Core.TopQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.SkipQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.ClientRequestIdHeader"
}
Expand Down Expand Up @@ -844,13 +812,6 @@
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down Expand Up @@ -900,13 +861,6 @@
"description": "The name of the resource",
"required": true,
"type": "string"
},
{
"name": "continuationToken",
"in": "query",
"description": "Continuation token for pagination.",
"required": false,
"type": "string"
}
],
"responses": {
Expand Down
Loading