Skip to content

Commit 5556671

Browse files
Update JSON schema to support boolean and numeric (#62)
* Update JSON schema to support boolen and numeric * Update regexp of JSON schema to support boolean value and numeric value as well Update regexp of JSON schema to support boolean value and numeric value as well --------- Co-authored-by: Anson Liao <[email protected]>
1 parent a3eb9c7 commit 5556671

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

src/schema.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ const MockSpecSchema = {
3434
},
3535
UpdateBodySpec: {
3636
anyOf: [
37+
{
38+
properties: {
39+
jsonPath: {
40+
type: 'string',
41+
},
42+
value: {
43+
type: 'boolean',
44+
},
45+
},
46+
required: ['jsonPath', 'value'],
47+
type: 'object',
48+
},
49+
{
50+
properties: {
51+
jsonPath: {
52+
type: 'string',
53+
},
54+
value: {
55+
type: 'integer',
56+
},
57+
},
58+
required: ['jsonPath', 'value'],
59+
type: 'object',
60+
},
3761
{
3862
properties: {
3963
jsonPath: {
@@ -58,6 +82,30 @@ const MockSpecSchema = {
5882
type: 'object',
5983
required: ['regexp', 'value'],
6084
},
85+
{
86+
properties: {
87+
regexp: {
88+
type: 'string',
89+
},
90+
value: {
91+
type: 'boolean',
92+
},
93+
},
94+
type: 'object',
95+
required: ['regexp', 'value'],
96+
},
97+
{
98+
properties: {
99+
regexp: {
100+
type: 'string',
101+
},
102+
value: {
103+
type: 'integer',
104+
},
105+
},
106+
type: 'object',
107+
required: ['regexp', 'value'],
108+
},
61109
],
62110
},
63111
},

0 commit comments

Comments
 (0)