Open
Description
What is the bug?
As there is no named value Decade
defined in the enum (ChronoUnit). This discloses the underlying framework as Java and the response is 200.
osd-name: aosa
....
{"ok":false,"error":"No enum constant java.time.temporal.ChronoUnit.DECADE"
This occurs in the period key within detectionInterval, shown below:
POST /api/anomaly_detectors/detectors/9aef2360-90f7-11ef-954e-4313bff52b5f HTTP/1.1
Host: application-neo-signoff-01-c6k859wedzy26d2l24z9.us-east-1.opensearch-gamma.amazonaws.com
...
User-Agent: insomnia/9.3.3
Osd-Xsrf: nothing-to-see-here
Osd-Version: 2.17.0
Content-Length: 594
Connection: keep-alive
{"name":"testDetector04","description":"","indices":["opensearch_dashboards_sample_data_flights"],"filterQuery":{"match_all":{}},"uiMetadata":{"features":{"test":{"featureType":"simple_aggs","aggregationBy":"sum","aggregationOf":"FlightDelayMin"}},"filters":[]},"featureAttributes":[{"featureName":"test","featureEnabled":true,"importance":1,"aggregationQuery":{"test":{"sum":{"field":"FlightDelayMin",
"field":"FlightDelayMax"}}}}],"timeField":"timestamp","detectionInterval":{"period":{"interval":10,"unit":"Decade"}},
ChronoUnit: https://docs.oracle.com/javase/8/docs/api/index.html?java/time/temporal/ChronoUnit.html
Also tried Forever
to see what would happen but that's not supported.