Skip to content

Commit

Permalink
Changes for generated client to be AzureAIClient
Browse files Browse the repository at this point in the history
  • Loading branch information
singankit committed Sep 27, 2024
1 parent 7e2c177 commit a745f0e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Client/agents/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ using Azure.Core;
using Azure.Core.Traits;
using Azure.Core.Foundations;

namespace Azure.AI.Client.Agents;
namespace AzureAI.Agents;
4 changes: 2 additions & 2 deletions specification/ai/Azure.AI.Client/common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;

namespace Azure.AI.Client;
namespace AzureAI;

@doc("Metadata pertaining to creation and last modification of the resource.")
model SystemData {
Expand All @@ -27,4 +27,4 @@ model SystemData {
@visibility("read")
@doc("The timestamp of resource last modification (UTC)")
lastModifiedAt?: utcDateTime;
}
}
20 changes: 10 additions & 10 deletions specification/ai/Azure.AI.Client/endpoints/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import "@azure-tools/typespec-client-generator-core";

using Azure.ClientGenerator.Core;

@@access(Azure.AI.Client.Endpoints.list, Access.internal);
@@access(Azure.AI.Client.Endpoints.listSecrets, Access.internal);
@@access(Azure.AI.Client.ConnectionsListSecretsResponse, Access.internal);
@@access(Azure.AI.Client.ConnectionProperties, Access.internal);
@@access(Azure.AI.Client.ConnectionPropertiesApiKeyAuth, Access.internal);
@@access(Azure.AI.Client.ConnectionPropertiesAADAuth, Access.internal);
@@access(Azure.AI.Client.ConnectionPropertiesSASAuth, Access.internal);
@@access(Azure.AI.Client.CredentialsApiKeyAuth, Access.internal);
@@access(Azure.AI.Client.CredentialsSASAuth, Access.internal);
@@access(AzureAI.Endpoints.list, Access.internal);
@@access(AzureAI.Endpoints.listSecrets, Access.internal);
@@access(AzureAI.Endpoints.ConnectionsListSecretsResponse, Access.internal);
@@access(AzureAI.Endpoints.ConnectionProperties, Access.internal);
@@access(AzureAI.Endpoints.ConnectionPropertiesApiKeyAuth, Access.internal);
@@access(AzureAI.Endpoints.ConnectionPropertiesAADAuth, Access.internal);
@@access(AzureAI.Endpoints.ConnectionPropertiesSASAuth, Access.internal);
@@access(AzureAI.Endpoints.CredentialsApiKeyAuth, Access.internal);
@@access(AzureAI.Endpoints.CredentialsSASAuth, Access.internal);

/*
@@access(Azure.AI.Client.AuthenticationType, Access.internal);
@@access(Azure.AI.Client.EndpointType, Access.internal);
*/
*/
4 changes: 2 additions & 2 deletions specification/ai/Azure.AI.Client/endpoints/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Traits;

namespace Azure.AI.Client;
namespace AzureAI.Endpoints;

@doc("to do")
model ConnectionsListSecretsResponse {
Expand Down Expand Up @@ -163,4 +163,4 @@ union ModelType {
@doc("A model capable of taking chat-formatted messages and generate responses")
chat_completion: "chat_completion",
}
*/
*/
4 changes: 2 additions & 2 deletions specification/ai/Azure.AI.Client/endpoints/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using Azure.Core;
using Azure.Core.Traits;
using Azure.Core.Foundations;

namespace Azure.AI.Client.Endpoints;
namespace AzureAI.Endpoints;

/*
See https://learn.microsoft.com/rest/api/azureml/workspace-connections/list
Expand Down Expand Up @@ -51,4 +51,4 @@ op listSecrets is Azure.Core.Foundations.Operation<
apiVersionInBody: string;
},
ConnectionsListSecretsResponse
>;
>;
4 changes: 2 additions & 2 deletions specification/ai/Azure.AI.Client/evaluations/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Traits;

namespace Azure.AI.Client.Evaluations;
namespace AzureAI.Evaluations;

@doc("Evaluator Configuration")
model EvaluatorConfiguration {
Expand Down Expand Up @@ -116,4 +116,4 @@ alias ResourceCreatedResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Ht

#suppress "@azure-tools/typespec-providerhub/no-inline-model" "Need to create reponses correctly"
alias OkResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Http.Response<200> &
T;
T;
4 changes: 2 additions & 2 deletions specification/ai/Azure.AI.Client/evaluations/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using Azure.Core;
using Azure.Core.Traits;
using Azure.Core.Foundations;

namespace Azure.AI.Client.Evaluations;
namespace AzureAI.Evaluations;

interface Evaluations {
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
Expand Down Expand Up @@ -71,4 +71,4 @@ interface Evaluations {
},
OkResponse<Evaluation>
>;
}
}
9 changes: 2 additions & 7 deletions specification/ai/Azure.AI.Client/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Traits;

#suppress "@azure-tools/typespec-azure-core/casing-style"
namespace Azure.AI {

}

@useAuth(
OAuth2Auth<[
{
Expand Down Expand Up @@ -44,11 +39,11 @@ namespace Azure.AI {
}
)
@versioned(Versions)
namespace Azure.AI.Client {
namespace AzureAI {
@doc("Azure AI API versions")
enum Versions {
@doc("Azure AI API version 2024-07-01-preview.")
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
`2024-07-01-preview`,
}
}
}

0 comments on commit a745f0e

Please sign in to comment.