@@ -31,11 +31,11 @@ pub struct ScalaParams {
31
31
#[ serde( default ) ]
32
32
pub struct SwiftParams {
33
33
pub prefix : String ,
34
- pub type_mappings : HashMap < String , String > ,
35
34
pub default_decorators : Vec < String > ,
36
35
pub default_generic_constraints : Vec < String > ,
37
36
/// The contraints to apply to `CodableVoid`.
38
37
pub codablevoid_constraints : Vec < String > ,
38
+ pub type_mappings : HashMap < String , String > ,
39
39
}
40
40
41
41
#[ derive( Default , Serialize , Deserialize , PartialEq , Eq , Debug ) ]
@@ -49,8 +49,8 @@ pub struct TypeScriptParams {
49
49
#[ cfg( feature = "go" ) ]
50
50
pub struct GoParams {
51
51
pub package : String ,
52
- pub type_mappings : HashMap < String , String > ,
53
52
pub uppercase_acronyms : Vec < String > ,
53
+ pub type_mappings : HashMap < String , String > ,
54
54
}
55
55
56
56
/// The paramters that are used to configure the behaviour of typeshare
@@ -126,6 +126,14 @@ mod test {
126
126
[ CURRENT_DIR , TEST_DIR , filename] . iter ( ) . collect ( )
127
127
}
128
128
129
+ #[ test]
130
+ fn to_string_and_back ( ) {
131
+ let path = config_file_path ( "mappings_config.toml" ) ;
132
+ let config = load_config ( Some ( path) ) . unwrap ( ) ;
133
+
134
+ toml:: from_str :: < Config > ( & toml:: to_string_pretty ( & config) . unwrap ( ) ) . unwrap ( ) ;
135
+ }
136
+
129
137
#[ test]
130
138
fn default_test ( ) {
131
139
let path = config_file_path ( "default_config.toml" ) ;
0 commit comments