From b69d13e9190d62e8c8963e8f8af7f4836432ca1f Mon Sep 17 00:00:00 2001 From: catalinaperalta Date: Wed, 26 Apr 2023 10:56:21 -0700 Subject: [PATCH] [AnomalyDetector] Fix for SDK clients due to associative arrays (#23664) * do not generate convenient api for univariate entire detect op * clean up client.tsp * Update tspconfig.yaml Added options for ts emitter java emitter. --------- Co-authored-by: Ray Chen --- .../cognitiveservices/AnomalyDetector/client.tsp | 12 +----------- .../AnomalyDetector/tspconfig.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/specification/cognitiveservices/AnomalyDetector/client.tsp b/specification/cognitiveservices/AnomalyDetector/client.tsp index 7795737ece01..bfcb1117d5bc 100644 --- a/specification/cognitiveservices/AnomalyDetector/client.tsp +++ b/specification/cognitiveservices/AnomalyDetector/client.tsp @@ -3,14 +3,4 @@ import "./main.tsp"; using Azure.ClientGenerator.Core; -@@convenientAPI(AnomalyDetector.Multivariate.GetMultivariateBatchDetectionResult, true) -@@convenientAPI(AnomalyDetector.Multivariate.TrainMultivariateModel, true) -@@convenientAPI(AnomalyDetector.Multivariate.ListMultivariateModels, true) -@@convenientAPI(AnomalyDetector.Multivariate.DeleteMultivariateModel, true) -@@convenientAPI(AnomalyDetector.Multivariate.GetMultivariateModel, true) -@@convenientAPI(AnomalyDetector.Multivariate.DetectMultivariateBatchAnomaly, true) -@@convenientAPI(AnomalyDetector.Multivariate.DetectMultivariateLastAnomaly, true) - -@@convenientAPI(AnomalyDetector.Univariate.DetectUnivariateEntireSeries, true) -@@convenientAPI(AnomalyDetector.Univariate.DetectUnivariateLastPoint, true) -@@convenientAPI(AnomalyDetector.Univariate.DetectUnivariateChangePoint, true) +@@convenientAPI(AnomalyDetector.Univariate.DetectUnivariateEntireSeries, false) diff --git a/specification/cognitiveservices/AnomalyDetector/tspconfig.yaml b/specification/cognitiveservices/AnomalyDetector/tspconfig.yaml index 8401bc690275..84035d69b58c 100644 --- a/specification/cognitiveservices/AnomalyDetector/tspconfig.yaml +++ b/specification/cognitiveservices/AnomalyDetector/tspconfig.yaml @@ -1,6 +1,12 @@ parameters: "python-sdk-folder": default: "{project-root}/azure-sdk-for-python/" + "java-sdk-folder": + default: "{project-root}/azure-sdk-for-java/" + "js-sdk-folder": + default: "{project-root}/azure-sdk-for-js/" + "csharp-sdk-folder": + default: "{project-root}/azure-sdk-for-net/" "service-directory-name": default: "anomalydetector" emit: [ @@ -22,9 +28,16 @@ options: "@azure-tools/typespec-java": namespace: com.azure.ai.anomalydetector partial-update: true + emitter-output-dir: "{java-sdk-folder}/sdk/{service-directory-name}/azure-ai-anomalydetector" # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code "@azure-tools/typespec-csharp": save-inputs: false clear-output-folder: true namespace: Azure.AI.AnomalyDetector model-namespace: false + "@azure-tools/typespec-ts": + emitter-output-dir: "{js-sdk-folder}/sdk/{service-directory-name}/ai-anomaly-detector-rest" + generateMetadata: true + generateTest: true + packageDetails: + name: "@azure-rest/ai-anomaly-detector"