File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 39
39
"additionalProperties" : false ,
40
40
"$schema" : " http://json-schema.org/draft-07/schema#"
41
41
},
42
+ {
43
+ "type" : " object" ,
44
+ "properties" : {
45
+ "filter" : {
46
+ "type" : " string" ,
47
+ "description" : " Filter the apps by name or description. Looks for substrings."
48
+ }
49
+ },
50
+ "additionalProperties" : false ,
51
+ "$schema" : " http://json-schema.org/draft-07/schema#"
52
+ },
42
53
{
43
54
"type" : " object" ,
44
55
"properties" : {
Original file line number Diff line number Diff line change @@ -182,6 +182,12 @@ export function convertJsonSchemaToZod(schema: JSONSchema): z.ZodTypeAny {
182
182
shape [ key ] = shape [ key ] . optional ( ) ;
183
183
}
184
184
}
185
+ } else {
186
+ // In JSON Schema, properties are optional by default
187
+ // if no required array is specified
188
+ for ( const key of Object . keys ( shape ) ) {
189
+ shape [ key ] = shape [ key ] . optional ( ) ;
190
+ }
185
191
}
186
192
187
193
// Create the schema with or without passthrough based on additionalProperties
You can’t perform that action at this time.
0 commit comments