echoapi-converter 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -973,6 +973,9 @@ const getApipostMode = (mode) => {
|
|
|
973
973
|
else if (mode == 'application/x-www-form-urlencoded') {
|
|
974
974
|
apipostMode = 'urlencoded';
|
|
975
975
|
}
|
|
976
|
+
else if (mode == 'application/octet-stream') {
|
|
977
|
+
apipostMode = 'binary';
|
|
978
|
+
}
|
|
976
979
|
else if (mode && mode != undefined) {
|
|
977
980
|
apipostMode = 'json';
|
|
978
981
|
}
|
|
@@ -1591,7 +1594,7 @@ class SwaggerToApipost {
|
|
|
1591
1594
|
request.body.raw_parameter = raw_parameter;
|
|
1592
1595
|
if (lodash.isEmpty(request.body.raw)) {
|
|
1593
1596
|
try {
|
|
1594
|
-
const myMockSchema = new MockSchema__default["default"]();
|
|
1597
|
+
const myMockSchema = new MockSchema__default["default"]({ app: 'echoapi' });
|
|
1595
1598
|
const schemaJson = yield myMockSchema.mock(bodyData.schema);
|
|
1596
1599
|
request.body.raw =
|
|
1597
1600
|
lodash.isPlainObject(schemaJson) || Array.isArray(Raw)
|
|
@@ -2023,7 +2026,7 @@ class SwaggerToApipost {
|
|
|
2023
2026
|
request.body.raw = transExample(parameter === null || parameter === void 0 ? void 0 : parameter.example) || Raw_text;
|
|
2024
2027
|
if (lodash.isEmpty(request.body.raw)) {
|
|
2025
2028
|
try {
|
|
2026
|
-
const myMockSchema = new MockSchema__default["default"]();
|
|
2029
|
+
const myMockSchema = new MockSchema__default["default"]({ app: 'echoapi' });
|
|
2027
2030
|
const schemaJson = yield myMockSchema.mock(parameter.schema);
|
|
2028
2031
|
request.body.raw =
|
|
2029
2032
|
lodash.isPlainObject(schemaJson) || Array.isArray(Raw)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echoapi-converter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "echoapi to swagger",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@types/lodash": "^4.14.202",
|
|
33
|
-
"apipost-mock-schema": "^0.0.
|
|
33
|
+
"apipost-mock-schema": "^0.0.37",
|
|
34
34
|
"apipost-tools": "0.0.34",
|
|
35
35
|
"axios": "^1.6.7",
|
|
36
36
|
"fs": "^0.0.1-security",
|