@@ -19,7 +19,7 @@ test("Schema of string schema", t => {
1919})
2020
2121test ("Schema of string schema with Email refinement" , t => {
22- let schema = S .string -> S .String . email
22+ let schema = S .string -> S .email
2323
2424 t -> Assert .deepEqual (
2525 JSONSchema .make (schema ),
@@ -34,7 +34,7 @@ test("Schema of string schema with Email refinement", t => {
3434})
3535
3636test ("Schema of string schema with Url refinement" , t => {
37- let schema = S .string -> S .String . url
37+ let schema = S .string -> S .url
3838
3939 t -> Assert .deepEqual (
4040 JSONSchema .make (schema ),
@@ -49,7 +49,7 @@ test("Schema of string schema with Url refinement", t => {
4949})
5050
5151test ("Schema of string schema with Datetime refinement" , t => {
52- let schema = S .string -> S .String . datetime
52+ let schema = S .string -> S .datetime
5353
5454 t -> Assert .deepEqual (
5555 JSONSchema .make (schema ),
@@ -64,7 +64,7 @@ test("Schema of string schema with Datetime refinement", t => {
6464})
6565
6666test ("Schema of string schema uses the last refinement for format" , t => {
67- let schema = S .string -> S .String . email -> S . String .datetime
67+ let schema = S .string -> S .email -> S .datetime
6868
6969 t -> Assert .deepEqual (
7070 JSONSchema .make (schema ),
@@ -79,7 +79,7 @@ test("Schema of string schema uses the last refinement for format", t => {
7979})
8080
8181test ("Schema of string schema with Cuid refinement" , t => {
82- let schema = S .string -> S .String . cuid
82+ let schema = S .string -> S .cuid
8383
8484 t -> Assert .deepEqual (
8585 JSONSchema .make (schema ),
@@ -93,7 +93,7 @@ test("Schema of string schema with Cuid refinement", t => {
9393})
9494
9595test ("Schema of string schema with Uuid refinement" , t => {
96- let schema = S .string -> S .String . uuid
96+ let schema = S .string -> S .uuid
9797
9898 t -> Assert .deepEqual (
9999 JSONSchema .make (schema ),
@@ -108,7 +108,7 @@ test("Schema of string schema with Uuid refinement", t => {
108108})
109109
110110test ("Schema of string schema with Pattern refinement" , t => {
111- let schema = S .string -> S .String . pattern (%re ("/abc/g" ))
111+ let schema = S .string -> S .pattern (%re ("/abc/g" ))
112112
113113 t -> Assert .deepEqual (
114114 JSONSchema .make (schema ),
@@ -123,7 +123,7 @@ test("Schema of string schema with Pattern refinement", t => {
123123})
124124
125125test ("Schema of string schema with Min refinement" , t => {
126- let schema = S .string -> S .String . min (1 )
126+ let schema = S .string -> S .stringMinLength (1 )
127127
128128 t -> Assert .deepEqual (
129129 JSONSchema .make (schema ),
@@ -138,7 +138,7 @@ test("Schema of string schema with Min refinement", t => {
138138})
139139
140140test ("Schema of string schema with Max refinement" , t => {
141- let schema = S .string -> S .String . max (1 )
141+ let schema = S .string -> S .stringMaxLength (1 )
142142
143143 t -> Assert .deepEqual (
144144 JSONSchema .make (schema ),
@@ -153,7 +153,7 @@ test("Schema of string schema with Max refinement", t => {
153153})
154154
155155test ("Schema of string schema with Length refinement" , t => {
156- let schema = S .string -> S .String . length (1 )
156+ let schema = S .string -> S .stringLength (1 )
157157
158158 t -> Assert .deepEqual (
159159 JSONSchema .make (schema ),
@@ -169,7 +169,7 @@ test("Schema of string schema with Length refinement", t => {
169169})
170170
171171test ("Schema of string schema with both Min and Max refinements" , t => {
172- let schema = S .string -> S .String . min (1 )-> S .String . max (4 )
172+ let schema = S .string -> S .stringMinLength (1 )-> S .stringMaxLength (4 )
173173
174174 t -> Assert .deepEqual (
175175 JSONSchema .make (schema ),
@@ -194,7 +194,7 @@ test("Schema of int schema", t => {
194194})
195195
196196test ("Schema of int schema with Min refinement" , t => {
197- let schema = S .int -> S .Int . min (1 )
197+ let schema = S .int -> S .intMin (1 )
198198
199199 t -> Assert .deepEqual (
200200 JSONSchema .make (schema ),
@@ -209,7 +209,7 @@ test("Schema of int schema with Min refinement", t => {
209209})
210210
211211test ("Schema of int schema with Max refinement" , t => {
212- let schema = S .int -> S .Int . max (1 )
212+ let schema = S .int -> S .intMax (1 )
213213
214214 t -> Assert .deepEqual (
215215 JSONSchema .make (schema ),
@@ -224,7 +224,7 @@ test("Schema of int schema with Max refinement", t => {
224224})
225225
226226test ("Schema of int schema with Port refinement" , t => {
227- let schema = S .int -> S .Int . port
227+ let schema = S .int -> S .port
228228
229229 t -> Assert .deepEqual (
230230 JSONSchema .make (schema ),
@@ -247,7 +247,7 @@ test("Schema of float schema", t => {
247247})
248248
249249test ("Schema of float schema with Min refinement" , t => {
250- let schema = S .float -> S .Float . min (1 .)
250+ let schema = S .float -> S .floatMin (1 .)
251251
252252 t -> Assert .deepEqual (
253253 JSONSchema .make (schema ),
@@ -262,7 +262,7 @@ test("Schema of float schema with Min refinement", t => {
262262})
263263
264264test ("Schema of float schema with Max refinement" , t => {
265- let schema = S .float -> S .Float . max (1 .)
265+ let schema = S .float -> S .floatMax (1 .)
266266
267267 t -> Assert .deepEqual (
268268 JSONSchema .make (schema ),
@@ -452,7 +452,7 @@ test("Schema of strings array schema", t => {
452452})
453453
454454test ("Schema of array schema with Min refinement" , t => {
455- let schema = S .array (S .string )-> S .Array . min (1 )
455+ let schema = S .array (S .string )-> S .arrayMinLength (1 )
456456
457457 t -> Assert .deepEqual (
458458 JSONSchema .make (schema ),
@@ -468,7 +468,7 @@ test("Schema of array schema with Min refinement", t => {
468468})
469469
470470test ("Schema of array schema with Max refinement" , t => {
471- let schema = S .array (S .string )-> S .Array . max (1 )
471+ let schema = S .array (S .string )-> S .arrayMaxLength (1 )
472472
473473 t -> Assert .deepEqual (
474474 JSONSchema .make (schema ),
@@ -484,7 +484,7 @@ test("Schema of array schema with Max refinement", t => {
484484})
485485
486486test ("Schema of array schema with Length refinement" , t => {
487- let schema = S .array (S .string )-> S .Array . length (1 )
487+ let schema = S .array (S .string )-> S .arrayLength (1 )
488488
489489 t -> Assert .deepEqual (
490490 JSONSchema .make (schema ),
@@ -862,7 +862,7 @@ test("Unknown schema doesn't affect final schema", t => {
862862})
863863
864864test ("JSON schema doesn't affect final schema" , t => {
865- let schema = S .json
865+ let schema = S .json (~ validate = false )
866866
867867 t -> Assert .deepEqual (
868868 JSONSchema .make (schema ),
0 commit comments