From cf2be84772c2abbd3b18ebca2dd51313743af15e Mon Sep 17 00:00:00 2001 From: Xia Zhu Date: Mon, 25 Feb 2019 15:06:05 +0800 Subject: [PATCH 1/3] [Anomaly Detector]change service name from AnomalyFinder2AnomalyDetector --- .../readme.go.md | 2 +- .../{AnomalyFinder => AnomalyDetector}/readme.md | 16 ++++++++-------- .../readme.nodejs.md | 4 ++-- .../readme.python.md | 8 ++++---- .../readme.ruby.md | 8 ++++---- .../readme.typescript.md | 4 ++-- .../stable/v2.0/AnomalyDetector.json} | 8 ++++---- .../stable/v2.0/examples/EntireDetect.json | 0 .../stable/v2.0/examples/LastDetect.json | 0 9 files changed, 25 insertions(+), 25 deletions(-) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.go.md (95%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.md (81%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.nodejs.md (83%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.python.md (81%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.ruby.md (77%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/readme.typescript.md (79%) rename specification/cognitiveservices/data-plane/{AnomalyFinder/stable/v2.0/AnomalyFinder.json => AnomalyDetector/stable/v2.0/AnomalyDetector.json} (95%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/stable/v2.0/examples/EntireDetect.json (100%) rename specification/cognitiveservices/data-plane/{AnomalyFinder => AnomalyDetector}/stable/v2.0/examples/LastDetect.json (100%) diff --git a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.go.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md similarity index 95% rename from specification/cognitiveservices/data-plane/AnomalyFinder/readme.go.md rename to specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md index 1c6667023fd1..2ebcd31376f7 100644 --- a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.go.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md @@ -5,7 +5,7 @@ These settings apply only when `--go` is specified on the command line. ``` yaml $(go) go: license-header: MICROSOFT_APACHE_NO_VERSION - namespace: anomalyfinder + namespace: anomalydetector clear-output-folder: true ``` diff --git a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md similarity index 81% rename from specification/cognitiveservices/data-plane/AnomalyFinder/readme.md rename to specification/cognitiveservices/data-plane/AnomalyDetector/readme.md index 6a860537fb1d..81c6f79183c0 100644 --- a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md @@ -1,8 +1,8 @@ -# Cognitive Services Anomaly Finder SDK +# Cognitive Services Anomaly Detector SDK > see https://aka.ms/autorest -Configuration for generating Anomaly Finder SDK. +Configuration for generating Anomaly Detector SDK. The current release is `release_2_0`. @@ -19,7 +19,7 @@ openapi-type: data-plane These settings apply only when `--tag=release_2_0` is specified on the command line. ``` yaml $(tag) == 'release_2_0' -input-file: stable/v2.0/AnomalyFinder.json +input-file: stable/v2.0/AnomalyDetector.json ``` ## Swagger to SDK @@ -36,7 +36,7 @@ swagger-to-sdk: - repo: azure-sdk-for-node - repo: azure-sdk-for-ruby after_scripts: - - bundle install && rake arm:regen_all_profiles['azure_cognitiveservices_anomalyfinder'] + - bundle install && rake arm:regen_all_profiles['azure_cognitiveservices_anomalydetector'] ``` ## CSharp Settings @@ -48,8 +48,8 @@ csharp: sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false - namespace: Microsoft.Azure.CognitiveServices.AnomalyFinder - output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/AnomalyFinder/AnomalyFinder/Generated + namespace: Microsoft.Azure.CognitiveServices.AnomalyDetector + output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/AnomalyDetector/AnomalyDetector/Generated clear-output-folder: true ``` @@ -69,10 +69,10 @@ Please also specify `--azure-libraries-for-java-folder=`. ``` yaml $(tag) == 'release_2_0' && $(ruby) -namespace: "Azure::CognitiveServices::AnomalyFinder::V2_0" -output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_anomalyfinder/lib -title: "AnomalyFinderClient" +namespace: "Azure::CognitiveServices::AnomalyDetector::V2_0" +output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_anomalydetector/lib +title: "AnomalyDetectorClient" ``` diff --git a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.typescript.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.typescript.md similarity index 79% rename from specification/cognitiveservices/data-plane/AnomalyFinder/readme.typescript.md rename to specification/cognitiveservices/data-plane/AnomalyDetector/readme.typescript.md index 339223231a18..4233005354a8 100644 --- a/specification/cognitiveservices/data-plane/AnomalyFinder/readme.typescript.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.typescript.md @@ -5,8 +5,8 @@ Please also specify `--typescript-sdks-folder= Date: Tue, 26 Feb 2019 23:10:17 +0800 Subject: [PATCH 2/3] add required fields; make list element not nullable; --- .../stable/v2.0/AnomalyDetector.json | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json index 121c10192397..0df27c6def0b 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json @@ -151,7 +151,8 @@ "type": "array", "description": "Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned.", "items": { - "$ref": "#/definitions/Point" + "$ref": "#/definitions/Point", + "x-nullable": false } }, "granularity": { @@ -233,7 +234,8 @@ "description": "ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.", "items": { "type": "number", - "format": "float" + "format": "float", + "x-nullable": false } }, "upperMargins": { @@ -241,7 +243,8 @@ "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - sensitivity)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting sensitivity value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", "items": { "type": "number", - "format": "float" + "format": "float", + "x-nullable": false } }, "lowerMargins": { @@ -249,34 +252,48 @@ "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - sensitivity)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", "items": { "type": "number", - "format": "float" + "format": "float", + "x-nullable": false } }, "isAnomaly": { "type": "array", "description": "IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", "items": { - "type": "boolean" + "type": "boolean", + "x-nullable": false } }, "isNegativeAnomaly": { "type": "array", "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.", "items": { - "type": "boolean" + "type": "boolean", + "x-nullable": false } }, "isPositiveAnomaly": { "type": "array", "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.", "items": { - "type": "boolean" + "type": "boolean", + "x-nullable": false } } } }, "LastDetectResponse": { "type": "object", + "required": [ + "expectedValue", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly", + "lowerMargin", + "period", + "upperMargin", + "suggestedWindow" + ], "properties": { "period": { "type": "integer", From 48a5bd16e7f889a4216343b8a6e0fb9d613de1c7 Mon Sep 17 00:00:00 2001 From: Xia Zhu Date: Wed, 27 Feb 2019 17:31:07 +0800 Subject: [PATCH 3/3] fix descriptions related to marginScale --- .../AnomalyDetector/stable/v2.0/AnomalyDetector.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json index 0df27c6def0b..96d89f3ad312 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v2.0/AnomalyDetector.json @@ -240,7 +240,7 @@ }, "upperMargins": { "type": "array", - "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - sensitivity)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting sensitivity value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", + "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", @@ -249,7 +249,7 @@ }, "lowerMargins": { "type": "array", - "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - sensitivity)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", + "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", @@ -313,12 +313,12 @@ "upperMargin": { "type": "number", "format": "float", - "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - sensitivity)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting sensitivity value, anomaly status of latest point can be changed." + "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed." }, "lowerMargin": { "type": "number", "format": "float", - "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - sensitivity)*lowerMargin. " + "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. " }, "isAnomaly": { "type": "boolean",