-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjson-schema.txt
49 lines (45 loc) · 892 Bytes
/
json-schema.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"productId": 1,
"productName": "some name",
"price": 12.50
}
const schema = {
type: "object",
required: ["productId"]
properties: {
"productId": {
description: "Unique id for a product",
type: "integer"
},
"productName": {
description: "product name ",
type: "string",
minLength: 10
}
}
}
[
{
"productId": 1,
"productName": "some name",
"price": 12.50
}
]
const schemaArray = {
type: 'array',
items: {
type: 'object',
required: ["productId"]
properties: {
"productId": {
description: "Unique id for a product",
type: "integer"
},
"productName": {
description: "product name ",
type: "string",
minLength: 10
}
}
}
}