@@ -19,14 +19,14 @@ var ZSSFieldMetaSchema = z.Struct(z.Shape{
1919
2020// ZSSTransformerSchema defines the schema for ZSSTransformer
2121var ZSSTransformerSchema = z .Struct (z.Shape {
22- "id " : z .String ().Required (),
22+ "ID " : z .String ().Required (),
2323})
2424
2525// ZSSTestSchema defines the schema for ZSSTest
2626var ZSSTestSchema = z .Struct (z.Shape {
27- "id " : z .String ().Required (),
27+ "ID " : z .String ().Required (),
2828 "message" : z .String ().Required (),
29- "issuePath" : z .Slice (z .String ()). Required () ,
29+ "issuePath" : z .Slice (z .String ()),
3030 "params" : z .EXPERIMENTAL_MAP [string , any ](z .String (), z .EXPERIMENTAL_ANY ()),
3131})
3232
@@ -37,6 +37,18 @@ var ZSSProcessorSchema = z.Struct(z.Shape{
3737 "transformer" : z .Ptr (ZSSTransformerSchema ),
3838})
3939
40+ var ZSSCustomTestSchema = z .Struct (z.Shape {
41+ "ID" : z .String (),
42+ "message" : z .String (),
43+ "issuePath" : z .Slice (z .String ()),
44+ "params" : z .EXPERIMENTAL_MAP [string , any ](z .String (), z .EXPERIMENTAL_ANY ()),
45+ })
46+
47+ var ZSSCustomProcessorSchema = z .Struct (z.Shape {
48+ "kind" : z .StringLike [zconst.ZogProcessor ]().OneOf ([]zconst.ZogProcessor {zconst .ZogProcessorTest }),
49+ "test" : z .Ptr (ZSSCustomTestSchema ).NotNil (),
50+ })
51+
4052// ZSSExtensionSchema defines the schema for ZSSExtension.
4153var ZSSExtensionSchema = z .Struct (z.Shape {
4254 "URI" : URISchema ,
@@ -52,7 +64,7 @@ var zssKind = func(k zconst.ZogType) *z.StringSchema[zconst.ZogType] {
5264// Note: defaultValue and catchValue are intentionally loose because ZSS allows arbitrary values.
5365var ZSSSchemaSchema = z .EXPERIMENTAL_RECURSIVE (func (self z.RecursiveSchema [* z.UnionSchema ]) * z.UnionSchema {
5466 ref := z .Struct (z.Shape {
55- "Ref" : z .String ().Required ().Min (1 ),
67+ "Ref" : z .Ptr ( z . String ().Required ().Min (1 )). NotNil ( ),
5668 })
5769
5870 str := z .Struct (z.Shape {
@@ -134,7 +146,7 @@ var ZSSSchemaSchema = z.EXPERIMENTAL_RECURSIVE(func(self z.RecursiveSchema[*z.Un
134146 custom := z .Struct (z.Shape {
135147 "Kind" : zssKind (zconst .TypeCustom ),
136148 "goTypes" : z .Slice (ZSSGoTypeSchema ),
137- "processors" : z .Slice (ZSSProcessorSchema ),
149+ "processors" : z .Slice (ZSSCustomProcessorSchema ),
138150 })
139151
140152 preprocess := z .Struct (z.Shape {
0 commit comments