@@ -90,6 +90,21 @@ pub enum CompareDateRangeType {
90
90
Multi ( Vec < Vec < String > > ) ,
91
91
}
92
92
93
+ #[ derive( Debug , Clone , Serialize , Deserialize , Hash , Eq , PartialEq ) ]
94
+ pub struct ExtendedDimensionFormat {
95
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
96
+ pub label : Option < String > ,
97
+ #[ serde( rename = "type" ) ]
98
+ pub format_type : String ,
99
+ }
100
+
101
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
102
+ #[ serde( untagged) ]
103
+ pub enum DimensionFormat {
104
+ Single ( String ) ,
105
+ Extended ( ExtendedDimensionFormat ) ,
106
+ }
107
+
93
108
// We can do nothing with JS functions here,
94
109
// but to keep DTOs in sync with reality, let's keep it.
95
110
pub type JsFunction = String ;
@@ -164,7 +179,7 @@ pub struct ConfigItem {
164
179
#[ serde( skip_serializing_if = "Option::is_none" ) ]
165
180
pub member_type : Option < String > ,
166
181
#[ serde( skip_serializing_if = "Option::is_none" ) ]
167
- pub format : Option < String > ,
182
+ pub format : Option < DimensionFormat > ,
168
183
#[ serde( skip_serializing_if = "Option::is_none" ) ]
169
184
pub meta : Option < Value > ,
170
185
#[ serde( skip_serializing_if = "Option::is_none" ) ]
@@ -198,7 +213,7 @@ pub struct AnnotatedConfigItem {
198
213
#[ serde( skip_serializing_if = "Option::is_none" ) ]
199
214
pub member_type : Option < String > ,
200
215
#[ serde( skip_serializing_if = "Option::is_none" ) ]
201
- pub format : Option < String > ,
216
+ pub format : Option < DimensionFormat > ,
202
217
#[ serde( skip_serializing_if = "Option::is_none" ) ]
203
218
pub meta : Option < Value > ,
204
219
#[ serde( skip_serializing_if = "Option::is_none" ) ]
0 commit comments