@@ -15,7 +15,7 @@ object({
1515 name: string (),
1616 price: number ({ minimum: 0 }),
1717 description: nullable (string ()),
18- tags : array (string ()),
18+ categories : array (string ()),
1919})
2020```
2121
@@ -38,7 +38,7 @@ npm install json-schema-kit
3838 "name" : { "type" : " string" },
3939 "price" : { "type" : " number" , "description" : " Price in dollars" },
4040 "discount" : { "anyOf" : [{ "type" : " number" }, { "type" : " null" }] },
41- "tags " : { "type" : " array" , "items" : { "type" : " string" } },
41+ "categories " : { "type" : " array" , "items" : { "type" : " string" , "enum" : [ " electronics " , " clothing " , " books " ] } },
4242 "dimensions" : {
4343 "type" : " object" ,
4444 "properties" : {
@@ -49,7 +49,7 @@ npm install json-schema-kit
4949 "additionalProperties" : false
5050 }
5151 },
52- "required" : [" name" , " price" , " discount" , " tags " , " dimensions" ],
52+ "required" : [" name" , " price" , " discount" , " categories " , " dimensions" ],
5353 "additionalProperties" : false
5454}
5555```
@@ -61,7 +61,7 @@ object({
6161 name: string (),
6262 price: number ({ description: ' Price in dollars' }),
6363 discount: nullable (number ()),
64- tags : array (string ()),
64+ categories : array (string ({ enum: [ ' electronics ' , ' clothing ' , ' books ' ] } )),
6565 dimensions: object ({
6666 width: number (),
6767 height: number (),
0 commit comments