@open-norantec/herbal 1.0.2-alpha.26 → 1.0.2-alpha.28
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.
|
@@ -95,7 +95,7 @@ var TypeScriptClient = (function (_super) {
|
|
|
95
95
|
return [4, this.schemaToTypeScriptLiteral(responseSchema)];
|
|
96
96
|
case 3:
|
|
97
97
|
responseTypeLiteral = _o.sent();
|
|
98
|
-
methodTypeMapCodeLines.push(["'".concat(pathname, "': {"), " request: ".concat(requestTypeLiteral, ";"), " response: ".concat(responseTypeLiteral, ";"), ' };'].join(''));
|
|
98
|
+
methodTypeMapCodeLines.push([" '".concat(pathname, "': {"), " request: ".concat(requestTypeLiteral, ";"), " response: ".concat(responseTypeLiteral, ";"), ' };'].join(''));
|
|
99
99
|
_o.label = 4;
|
|
100
100
|
case 4:
|
|
101
101
|
_i++;
|
|
@@ -210,11 +210,12 @@ var TypeScriptClient = (function (_super) {
|
|
|
210
210
|
return __generator(this, function (_a) {
|
|
211
211
|
switch (_a.label) {
|
|
212
212
|
case 0:
|
|
213
|
-
interfaceName = "
|
|
213
|
+
interfaceName = "Interface".concat(Math.random().toString(36).slice(2));
|
|
214
214
|
return [4, (0, json_schema_to_typescript_1.compile)(schema, interfaceName, {
|
|
215
215
|
format: true,
|
|
216
216
|
bannerComment: '',
|
|
217
217
|
additionalProperties: false,
|
|
218
|
+
unknownAny: false,
|
|
218
219
|
style: {
|
|
219
220
|
singleQuote: true,
|
|
220
221
|
semi: true,
|
|
@@ -226,7 +227,7 @@ var TypeScriptClient = (function (_super) {
|
|
|
226
227
|
.split('\n')
|
|
227
228
|
.map(function (line, index) { return "".concat(index === 0 ? '' : ' ').concat(line.trim()); })
|
|
228
229
|
.join('')
|
|
229
|
-
.
|
|
230
|
+
.replace(/^export\s+interface\s+Interface[a-zA-Z0-9-_]+\s+\{/, '{');
|
|
230
231
|
})];
|
|
231
232
|
case 1: return [2, _a.sent()];
|
|
232
233
|
}
|