Skip to content

Commit c74843f

Browse files
authored
Align response objects in schemas (#503)
* Update mockresponseplugin.schema.json schema * Remove unnecessary required fields in schema files
1 parent 2a98971 commit c74843f

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

schemas/v1.0/genericrandomerrorplugin.schema.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@
3939
]
4040
}
4141
}
42-
},
43-
"required": [
44-
"statusCode",
45-
"body"
46-
]
42+
}
4743
}
4844
}
4945
},

schemas/v1.0/mockresponseplugin.schema.json

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "object",
66
"properties": {
77
"$schema": {
8-
"type":"string"
8+
"type": "string"
99
},
1010
"mocks": {
1111
"type": "array",
@@ -41,31 +41,34 @@
4141
]
4242
},
4343
"response": {
44-
"body": {
45-
"type": [
46-
"object",
47-
"string"
48-
]
49-
},
50-
"code": {
51-
"type": "integer"
52-
},
53-
"headers": {
54-
"type": "array",
55-
"items": {
56-
"type": "object",
57-
"properties": {
58-
"name": {
59-
"type": "string"
60-
},
61-
"value": {
62-
"type": "string"
63-
}
64-
},
65-
"required": [
66-
"name",
67-
"value"
44+
"type": "object",
45+
"properties": {
46+
"body": {
47+
"type": [
48+
"object",
49+
"string"
6850
]
51+
},
52+
"statusCode": {
53+
"type": "integer"
54+
},
55+
"headers": {
56+
"type": "array",
57+
"items": {
58+
"type": "object",
59+
"properties": {
60+
"name": {
61+
"type": "string"
62+
},
63+
"value": {
64+
"type": "string"
65+
}
66+
},
67+
"required": [
68+
"name",
69+
"value"
70+
]
71+
}
6972
}
7073
}
7174
}

0 commit comments

Comments
 (0)