Skip to content

Commit 6a66c64

Browse files
committed
Enhance request body snippet
1 parent 42df3bd commit 6a66c64

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

localization/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"OBJECT___BROWSER_COLLECTION": "Requests",
2828
"OBJECT___BROWSER_NESTED_COLLECTIONS": "Responses",
2929
"OBJECT___BROWSER_VIEWS": "Filtered Aliases",
30-
"OBJECT___BROWSER_DEFINITIONS": "Definitions",
30+
"OBJECT___BROWSER_DEFINITIONS": "Components",
3131
"OBJECT___BROWSER_FIELDS": "Fields",
3232
"PROPERTIES_PANE___BUCKET_NAME": "Resource path",
3333
"PROPERTIES_PANE___VIEW_NAME": "Filtered alias name",

properties_pane/defaultData.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"value": "requestBody"
141141
}
142142
},{
143-
"value": "MIMEtype/subtype",
143+
"value": "application/json",
144144
"dependency": {
145145
"level": "parent",
146146
"key": "subtype",

snippets/requestBody.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
{
22
"name": "requestBody",
3-
"parentType": "document"
3+
"parentType": "document",
4+
"properties": [{
5+
"name": "application/json",
6+
"type": "media",
7+
"properties": [{
8+
"name": "schema",
9+
"type": "object"
10+
}, {
11+
"name": "examples",
12+
"type": "object",
13+
"subtype": "example"
14+
}, {
15+
"name": "encoding",
16+
"type": "object",
17+
"subtype": "encoding"
18+
}]
19+
}]
420
}

snippets/requestStructure.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@
66
"subtype": "anyParameter"
77
}, {
88
"name": "requestBody",
9-
"type": "requestBody"
9+
"type": "requestBody",
10+
"properties": [{
11+
"name": "application/json",
12+
"type": "media",
13+
"properties": [{
14+
"name": "schema",
15+
"type": "object"
16+
}, {
17+
"name": "examples",
18+
"type": "object",
19+
"subtype": "example"
20+
}, {
21+
"name": "encoding",
22+
"type": "object",
23+
"subtype": "encoding"
24+
}]
25+
}]
1026
}, {
1127
"name": "callbacks",
1228
"type": "operationObject",

types/requestBody.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"maxProperties": "",
1717
"additionalProperties": false,
1818
"enum": [],
19+
"snippet": "requestBody",
1920
"subtype": "media",
2021
"hackoladeMeta": {
2122
"disableAdd": false,

0 commit comments

Comments
 (0)