Skip to content

Commit

Permalink
Changing evaluation routes to not use interface
Browse files Browse the repository at this point in the history
  • Loading branch information
singankit committed Sep 28, 2024
1 parent 384d67b commit d0a9ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 84 deletions.
65 changes: 2 additions & 63 deletions specification/ai/Azure.AI.Client/evaluations/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,72 +16,11 @@ namespace AzureAI.Evaluations;
@post
@route("/evaluations/create")
@doc("Creates an evaluation.")
operation create is Azure.Core.Foundations.Operation<
op create is Azure.Core.Foundations.Operation<
{
@doc("Properties of Evaluation.")
@body
evaluation: Evaluation;
},
ResourceCreatedResponse<Evaluation>

/**
interface Evaluations {
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
@doc("Get an evaluation.")
@route("/evaluations/{id}")
@get
get is Azure.Core.Foundations.Operation<
{
@doc("Identifier of the evaluation.")
@pattern("^[a-zA-Z0-9][a-zA-Z0-9-_]*$")
@maxLength(254)
@path
id: string;
},
Evaluation
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
@doc("Creates an evaluation.")
@route("/evaluations/create")
@post
create is Azure.Core.Foundations.Operation<
{
@doc("Properties of Evaluation.")
@body
evaluation: Evaluation;
},
ResourceCreatedResponse<Evaluation>
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
@doc("List evaluations")
@route("/evaluations")
@get
list is Azure.Core.Foundations.Operation<
{
...StandardListQueryParameters;
},
PagedEvaluation
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
@doc("Update an evaluation.")
@route("/evaluations/{id}")
@patch
update is Azure.Core.Foundations.Operation<
{
@doc("Identifier of the evaluation.")
@pattern("^[a-zA-Z0-9][a-zA-Z0-9-_]*$")
@maxLength(254)
@path
id: string;

@doc("Update evaluation request.")
@body
body: UpdateEvaluationRequest;
},
OkResponse<Evaluation>
>;
}
**/
>;
21 changes: 0 additions & 21 deletions specification/ai/Azure.AI.Client/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,6 @@ using Azure.Core.Traits;
workspaceName: string,
}
)
@route("/connections")

@server(
"https://{region}.api.azureml.ms/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}",
"Azure AI",
{
@doc("The region of the workspace.")
region: string,

@doc("The ID of the target subscription.")
subscriptionId: string,

@doc("The name of the Resource Group.")
resourceGroupName: string,

@doc("The name of the workspace (Azure AI Studio hub).")
workspaceName: string,
}
)
@route("/evaluations")

@versioned(Versions)
namespace AzureAI {
@doc("Azure AI API versions")
Expand Down

0 comments on commit d0a9ce3

Please sign in to comment.