Hello,
I’m trying to automate dashboard generation and for this am generating JSON definitions for them.
In the development process, I start from a JSON exported via a describe-dashboard-definition
CLI command which output is placed into a file that is later read by NodeJS code and a new dashboard is created using AWS SDK v3 CreateDashboardCommand
.
This works well, but I sometimes create wrong JSON and am receiving error messages, as is expected. But there is an issue in this situation, where the error message complains about violated constraint but sets the first letter of missing fields to a lower case version.
For instance, I added a KpiVisual
property to a Visuals
array and I received this error message:
... at 'definition.sheets.2.member.visuals' failed to satisfy constraint: Only 1 member of [tableVisual, pivotTableVisual, barChartVisual, kPIVisual, pieChartVisual, gaugeChartVisual, lineChartVisual, heatMapVisual, treeMapVisual, geospatialMapVisual, filledMapVisual, layerMapVisual, funnelChartVisual, scatterPlotVisual, comboChartVisual, boxPlotVisual, waterfallVisual, histogramVisual, wordCloudVisual, insightVisual, sankeyDiagramVisual, customContentVisual, emptyVisual, radarChartVisual, pluginVisual] should be provided for structure Visual"
So at first, I retried with kPIVisual
but still got the same error, until I figured that it should have been KPIVisual
all along
Why are the error messages referring to invalid field names case?
Notice that even the parent item names are also lower- cased: 'definition.sheets.2.member.visuals'
Did I miss something in the API configuration?