Skip to content

Commit

Permalink
[AnomalyDetector] Fix for SDK clients due to associative arrays (#23664)
Browse files Browse the repository at this point in the history
* 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 <raychen@microsoft.com>
  • Loading branch information
catalinaperalta and raych1 authored Apr 26, 2023
1 parent c03cc8f commit b69d13e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 1 addition & 11 deletions specification/cognitiveservices/AnomalyDetector/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 13 additions & 0 deletions specification/cognitiveservices/AnomalyDetector/tspconfig.yaml
Original file line number Diff line number Diff line change
@@ -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: [
Expand All @@ -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"

0 comments on commit b69d13e

Please sign in to comment.