@@ -39,6 +39,8 @@ impl Parse for Options {
3939pub fn cw_serde_impl ( options : Options , input : DeriveInput ) -> syn:: Result < DeriveInput > {
4040 let crate_path = & options. crate_path ;
4141 let crate_path_displayable = crate_path. to_token_stream ( ) ;
42+
43+ let cw_schema_path = format ! ( "{crate_path_displayable}::cw_schema" ) ;
4244 let serde_path = format ! ( "{crate_path_displayable}::serde" ) ;
4345 let schemars_path = format ! ( "{crate_path_displayable}::schemars" ) ;
4446
@@ -49,10 +51,12 @@ pub fn cw_serde_impl(options: Options, input: DeriveInput) -> syn::Result<Derive
4951 :: std:: clone:: Clone ,
5052 :: std:: fmt:: Debug ,
5153 :: std:: cmp:: PartialEq ,
52- #crate_path:: schemars:: JsonSchema
54+ #crate_path:: schemars:: JsonSchema ,
55+ #crate_path:: cw_schema:: Schemaifier ,
5356 ) ]
5457 #[ allow( clippy:: derive_partial_eq_without_eq) ] // Allow users of `#[cw_serde]` to not implement Eq without clippy complaining
5558 #[ serde( crate = #serde_path) ]
59+ #[ schemaifier( crate = #cw_schema_path) ]
5660 #[ schemars( crate = #schemars_path) ]
5761 } ;
5862
@@ -95,10 +99,12 @@ mod tests {
9599 :: std:: clone:: Clone ,
96100 :: std:: fmt:: Debug ,
97101 :: std:: cmp:: PartialEq ,
98- :: my_crate:: cw_schema:: schemars:: JsonSchema
102+ :: my_crate:: cw_schema:: schemars:: JsonSchema ,
103+ :: my_crate:: cw_schema:: cw_schema:: Schemaifier ,
99104 ) ]
100105 #[ allow( clippy:: derive_partial_eq_without_eq) ]
101106 #[ serde( crate = ":: my_crate :: cw_schema::serde" ) ]
107+ #[ schemaifier( crate = ":: my_crate :: cw_schema::cw_schema" ) ]
102108 #[ schemars( crate = ":: my_crate :: cw_schema::schemars" ) ]
103109 pub struct InstantiateMsg {
104110 pub verifier: String ,
@@ -129,10 +135,12 @@ mod tests {
129135 :: std:: clone:: Clone ,
130136 :: std:: fmt:: Debug ,
131137 :: std:: cmp:: PartialEq ,
132- :: cosmwasm_schema:: schemars:: JsonSchema
138+ :: cosmwasm_schema:: schemars:: JsonSchema ,
139+ :: cosmwasm_schema:: cw_schema:: Schemaifier ,
133140 ) ]
134141 #[ allow( clippy:: derive_partial_eq_without_eq) ]
135142 #[ serde( crate = ":: cosmwasm_schema::serde" ) ]
143+ #[ schemaifier( crate = ":: cosmwasm_schema::cw_schema" ) ]
136144 #[ schemars( crate = ":: cosmwasm_schema::schemars" ) ]
137145 pub struct InstantiateMsg {
138146 pub verifier: String ,
@@ -160,10 +168,12 @@ mod tests {
160168 :: std:: clone:: Clone ,
161169 :: std:: fmt:: Debug ,
162170 :: std:: cmp:: PartialEq ,
163- :: cosmwasm_schema:: schemars:: JsonSchema
171+ :: cosmwasm_schema:: schemars:: JsonSchema ,
172+ :: cosmwasm_schema:: cw_schema:: Schemaifier ,
164173 ) ]
165174 #[ allow( clippy:: derive_partial_eq_without_eq) ]
166175 #[ serde( crate = ":: cosmwasm_schema::serde" ) ]
176+ #[ schemaifier( crate = ":: cosmwasm_schema::cw_schema" ) ]
167177 #[ schemars( crate = ":: cosmwasm_schema::schemars" ) ]
168178 pub struct InstantiateMsg { }
169179 } ;
@@ -193,10 +203,12 @@ mod tests {
193203 :: std:: clone:: Clone ,
194204 :: std:: fmt:: Debug ,
195205 :: std:: cmp:: PartialEq ,
196- :: cosmwasm_schema:: schemars:: JsonSchema
206+ :: cosmwasm_schema:: schemars:: JsonSchema ,
207+ :: cosmwasm_schema:: cw_schema:: Schemaifier ,
197208 ) ]
198209 #[ allow( clippy:: derive_partial_eq_without_eq) ]
199210 #[ serde( crate = ":: cosmwasm_schema::serde" ) ]
211+ #[ schemaifier( crate = ":: cosmwasm_schema::cw_schema" ) ]
200212 #[ schemars( crate = ":: cosmwasm_schema::schemars" ) ]
201213 #[ serde( rename_all = "snake_case" ) ]
202214 pub enum SudoMsg {
0 commit comments