16
16
17
17
from contentctl .output .json_writer import JsonWriter
18
18
19
- EXCLUDE_NONE : bool = True
20
-
21
19
22
20
class ApiJsonOutput :
23
21
output_path : pathlib .Path
@@ -53,8 +51,7 @@ def writeDetections(
53
51
"source" ,
54
52
"nes_fields" ,
55
53
]
56
- ),
57
- exclude_none = EXCLUDE_NONE ,
54
+ )
58
55
)
59
56
for detection in objects
60
57
]
@@ -81,10 +78,7 @@ def writeMacros(
81
78
objects : list [Macro ],
82
79
) -> None :
83
80
macros = [
84
- macro .model_dump (
85
- include = set (["definition" , "description" , "name" ]),
86
- exclude_none = EXCLUDE_NONE ,
87
- )
81
+ macro .model_dump (include = set (["definition" , "description" , "name" ]))
88
82
for macro in objects
89
83
]
90
84
for macro in macros :
@@ -117,8 +111,7 @@ def writeStories(
117
111
"baseline_names" ,
118
112
"detections" ,
119
113
]
120
- ),
121
- exclude_none = EXCLUDE_NONE ,
114
+ )
122
115
)
123
116
for story in objects
124
117
]
@@ -164,8 +157,7 @@ def writeBaselines(
164
157
"references" ,
165
158
"tags" ,
166
159
]
167
- ),
168
- exclude_none = EXCLUDE_NONE ,
160
+ )
169
161
)
170
162
for baseline in objects
171
163
]
@@ -198,8 +190,7 @@ def writeInvestigations(
198
190
"tags" ,
199
191
"lowercase_name" ,
200
192
]
201
- ),
202
- exclude_none = EXCLUDE_NONE ,
193
+ )
203
194
)
204
195
for investigation in objects
205
196
]
@@ -227,8 +218,7 @@ def writeLookups(
227
218
"min_matches" ,
228
219
"case_sensitive_match" ,
229
220
]
230
- ),
231
- exclude_none = EXCLUDE_NONE ,
221
+ )
232
222
)
233
223
for lookup in objects
234
224
]
@@ -258,8 +248,7 @@ def writeDeployments(
258
248
"rba" ,
259
249
"tags" ,
260
250
]
261
- ),
262
- exclude_none = EXCLUDE_NONE ,
251
+ )
263
252
)
264
253
for deployment in objects
265
254
]
0 commit comments