File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -86,24 +86,30 @@ impl Entrypoints {
8686 }
8787}
8888
89- #[ derive( Serialize , Debug ) ]
89+ #[ derive( Debug ) ]
9090pub struct Data {
91+ base : BaseData ,
92+
93+ // We will merge this in a custom way, so don't emit as part of the base
94+ rest : Option < serde_json:: Value > ,
95+ }
96+
97+ #[ derive( Serialize , Debug ) ]
98+ struct BaseData {
9199 server_name : String ,
92100
93101 /// Limits on the number of application sessions that each user can have
94102 session_limit : Option < SessionLimitConfig > ,
95-
96- // We will merge this in a custom way, so don't emit as part of the base
97- #[ serde( skip) ]
98- rest : Option < serde_json:: Value > ,
99103}
100104
101105impl Data {
102106 #[ must_use]
103107 pub fn new ( server_name : String , session_limit : Option < SessionLimitConfig > ) -> Self {
104108 Self {
105- server_name,
106- session_limit,
109+ base : BaseData {
110+ server_name,
111+ session_limit,
112+ } ,
107113
108114 rest : None ,
109115 }
@@ -116,7 +122,7 @@ impl Data {
116122 }
117123
118124 fn to_value ( & self ) -> Result < serde_json:: Value , anyhow:: Error > {
119- let base = serde_json:: to_value ( self ) ?;
125+ let base = serde_json:: to_value ( & self . base ) ?;
120126
121127 if let Some ( rest) = & self . rest {
122128 merge_data ( base, rest. clone ( ) )
You can’t perform that action at this time.
0 commit comments