@@ -90,6 +90,21 @@ pub enum CompareDateRangeType {
9090 Multi ( Vec < Vec < String > > ) ,
9191}
9292
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+
93108// We can do nothing with JS functions here,
94109// but to keep DTOs in sync with reality, let's keep it.
95110pub type JsFunction = String ;
@@ -164,7 +179,7 @@ pub struct ConfigItem {
164179 #[ serde( skip_serializing_if = "Option::is_none" ) ]
165180 pub member_type : Option < String > ,
166181 #[ serde( skip_serializing_if = "Option::is_none" ) ]
167- pub format : Option < String > ,
182+ pub format : Option < DimensionFormat > ,
168183 #[ serde( skip_serializing_if = "Option::is_none" ) ]
169184 pub meta : Option < Value > ,
170185 #[ serde( skip_serializing_if = "Option::is_none" ) ]
@@ -198,7 +213,7 @@ pub struct AnnotatedConfigItem {
198213 #[ serde( skip_serializing_if = "Option::is_none" ) ]
199214 pub member_type : Option < String > ,
200215 #[ serde( skip_serializing_if = "Option::is_none" ) ]
201- pub format : Option < String > ,
216+ pub format : Option < DimensionFormat > ,
202217 #[ serde( skip_serializing_if = "Option::is_none" ) ]
203218 pub meta : Option < Value > ,
204219 #[ serde( skip_serializing_if = "Option::is_none" ) ]
0 commit comments