openapi-ts-generator 3.197.5 → 4.80.2

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.
@@ -21,17 +21,18 @@ var base_generator_1 = require("./base-generator");
21
21
  var BarrelGenerator = /** @class */ (function (_super) {
22
22
  __extends(BarrelGenerator, _super);
23
23
  function BarrelGenerator(options) {
24
+ var _this = this;
24
25
  var _a;
25
- var _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.barrel) || this;
26
+ _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.barrel) || this;
26
27
  _this.GeneratorName = 'BarrelGenerator';
27
28
  _this.tsRegex = /.ts$/;
28
29
  return _this;
29
30
  }
30
31
  BarrelGenerator.prototype.generate = function () {
31
32
  var _this = this;
32
- var fileNames = fs_1.readdirSync(this.generatorOptions.outputPath).map(function (value) { return value.replace(_this.tsRegex, ''); });
33
+ var fileNames = (0, fs_1.readdirSync)(this.generatorOptions.outputPath).map(function (value) { return value.replace(_this.tsRegex, ''); });
33
34
  fileNames = fileNames.filter(function (x) { return x !== 'endpoints'; });
34
- return _super.prototype.generateFile.call(this, this.generatorOptions.outputPath + "/index.ts", { fileNames: fileNames });
35
+ return _super.prototype.generateFile.call(this, "".concat(this.generatorOptions.outputPath, "/index.ts"), { fileNames: fileNames });
35
36
  };
36
37
  return BarrelGenerator;
37
38
  }(base_generator_1.BaseGenerator));
@@ -9,8 +9,8 @@ var BaseGenerator = /** @class */ (function () {
9
9
  this.templateFilePath = templateFilePath;
10
10
  this.emptyArrayRegex = /, ]/g;
11
11
  if (templateFilePath) {
12
- var templateSource = fs_1.readFileSync(templateFilePath, { encoding: 'utf8' });
13
- this.template = handlebars_1.compile(templateSource);
12
+ var templateSource = (0, fs_1.readFileSync)(templateFilePath, { encoding: 'utf8' });
13
+ this.template = (0, handlebars_1.compile)(templateSource);
14
14
  }
15
15
  }
16
16
  BaseGenerator.prototype.generateFile = function (outputFilePath, context) {
@@ -18,20 +18,20 @@ var BaseGenerator = /** @class */ (function () {
18
18
  if (this.template) {
19
19
  try {
20
20
  var content = this.template(context).replace(this.emptyArrayRegex, ']');
21
- fs_1.writeFileSync(outputFilePath, content, { encoding: 'utf8' });
21
+ (0, fs_1.writeFileSync)(outputFilePath, content, { encoding: 'utf8' });
22
22
  return content;
23
23
  }
24
24
  catch (err) {
25
- (_a = this.generatorOptions.logger) === null || _a === void 0 ? void 0 : _a.error("Error executing template: " + ((_b = this.templateFilePath) !== null && _b !== void 0 ? _b : 'undefined') + ".");
25
+ (_a = this.generatorOptions.logger) === null || _a === void 0 ? void 0 : _a.error("Error executing template: ".concat((_b = this.templateFilePath) !== null && _b !== void 0 ? _b : 'undefined', "."));
26
26
  (_c = this.generatorOptions.logger) === null || _c === void 0 ? void 0 : _c.error("This is likely an issue with the template.");
27
- (_d = this.generatorOptions.logger) === null || _d === void 0 ? void 0 : _d.error("Data: " + JSON.stringify(context));
27
+ (_d = this.generatorOptions.logger) === null || _d === void 0 ? void 0 : _d.error("Data: ".concat(JSON.stringify(context)));
28
28
  (_e = this.generatorOptions.logger) === null || _e === void 0 ? void 0 : _e.error("Goto: https://github.com/ikemtz/openapi-ts-generator to report an issue if necessary.");
29
- (_f = this.generatorOptions.logger) === null || _f === void 0 ? void 0 : _f.error(err);
29
+ (_f = this.generatorOptions.logger) === null || _f === void 0 ? void 0 : _f.error(JSON.stringify(err));
30
30
  throw err;
31
31
  }
32
32
  }
33
33
  else {
34
- (_g = this.generatorOptions.logger) === null || _g === void 0 ? void 0 : _g.warn("Template for " + this.GeneratorName + " has not been specified");
34
+ (_g = this.generatorOptions.logger) === null || _g === void 0 ? void 0 : _g.warn("Template for ".concat(this.GeneratorName, " has not been specified"));
35
35
  }
36
36
  return null;
37
37
  };
@@ -25,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
25
25
  };
26
26
  return __assign.apply(this, arguments);
27
27
  };
28
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
29
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
30
- to[j] = from[i];
31
- return to;
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
32
36
  };
33
37
  Object.defineProperty(exports, "__esModule", { value: true });
34
38
  exports.EndPointsGenerator = void 0;
@@ -37,19 +41,20 @@ var _ = require("lodash");
37
41
  var EndPointsGenerator = /** @class */ (function (_super) {
38
42
  __extends(EndPointsGenerator, _super);
39
43
  function EndPointsGenerator(options) {
44
+ var _this = this;
40
45
  var _a;
41
- var _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.endpoints) || this;
46
+ _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.endpoints) || this;
42
47
  _this.GeneratorName = 'EndPointsGenerator';
43
48
  _this.endpointIdentifierRegex = /[A-z0-9_-]*$/;
44
49
  return _this;
45
50
  }
46
51
  EndPointsGenerator.prototype.generate = function (templateData) {
47
52
  var paths = this.eliminateDupes(templateData);
48
- return _super.prototype.generateFile.call(this, this.generatorOptions.outputPath + "/endpoints.ts", { paths: paths });
53
+ return _super.prototype.generateFile.call(this, "".concat(this.generatorOptions.outputPath, "/endpoints.ts"), { paths: paths });
49
54
  };
50
55
  EndPointsGenerator.prototype.eliminateDupes = function (templateData) {
51
56
  var _this = this;
52
- var sortedTemplateData = __spreadArray([], templateData.paths).sort(function (x, y) { return (x.endpoint.toUpperCase() < y.endpoint.toUpperCase() ? -1 : 1); });
57
+ var sortedTemplateData = __spreadArray([], templateData.paths, true).sort(function (x, y) { return (x.endpoint.toUpperCase() < y.endpoint.toUpperCase() ? -1 : 1); });
53
58
  var result = [];
54
59
  sortedTemplateData.forEach(function (val) {
55
60
  val = __assign(__assign({}, val), { tag: _.camelCase(val.tag) });
@@ -57,7 +62,7 @@ var EndPointsGenerator = /** @class */ (function (_super) {
57
62
  if (dupeIndex > -1) {
58
63
  var dupeCount = result.filter(function (f) { return f.tag === val.tag; }).length + 1;
59
64
  var endpointIdentifier = (_this.endpointIdentifierRegex.exec(val.endpoint) || [])[0];
60
- result.push(__assign(__assign({}, val), { tag: _.camelCase(val.tag + "_" + (endpointIdentifier || dupeCount)) }));
65
+ result.push(__assign(__assign({}, val), { tag: _.camelCase("".concat(val.tag, "_").concat(endpointIdentifier || dupeCount)) }));
61
66
  }
62
67
  else {
63
68
  result.push(val);
@@ -21,8 +21,9 @@ var base_generator_1 = require("./base-generator");
21
21
  var FormGroupGenerator = /** @class */ (function (_super) {
22
22
  __extends(FormGroupGenerator, _super);
23
23
  function FormGroupGenerator(options) {
24
+ var _this = this;
24
25
  var _a;
25
- var _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.formGroupFactory) || this;
26
+ _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.formGroupFactory) || this;
26
27
  _this.GeneratorName = 'FormGroupGenerator';
27
28
  return _this;
28
29
  }
@@ -30,7 +31,7 @@ var FormGroupGenerator = /** @class */ (function (_super) {
30
31
  var _this = this;
31
32
  var _a;
32
33
  (_a = templateData.entities) === null || _a === void 0 ? void 0 : _a.filter(function (val) { var _a, _b; return ((_a = val.valueProperties) === null || _a === void 0 ? void 0 : _a.length) + ((_b = val.referenceProperties) === null || _b === void 0 ? void 0 : _b.length) > 0; }).forEach(function (entity) {
33
- _super.prototype.generateFile.call(_this, _this.generatorOptions.outputPath + "/" + _.kebabCase(entity.name) + ".form-group-fac.ts", entity);
34
+ _super.prototype.generateFile.call(_this, "".concat(_this.generatorOptions.outputPath, "/").concat(_.kebabCase(entity.name), ".form-group-fac.ts"), entity);
34
35
  });
35
36
  };
36
37
  return FormGroupGenerator;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -21,8 +21,9 @@ var base_generator_1 = require("./base-generator");
21
21
  var ModelGenerator = /** @class */ (function (_super) {
22
22
  __extends(ModelGenerator, _super);
23
23
  function ModelGenerator(options) {
24
+ var _this = this;
24
25
  var _a;
25
- var _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.model) || this;
26
+ _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.model) || this;
26
27
  _this.GeneratorName = 'ModelGenerator';
27
28
  return _this;
28
29
  }
@@ -30,7 +31,7 @@ var ModelGenerator = /** @class */ (function (_super) {
30
31
  var _this = this;
31
32
  var _a;
32
33
  (_a = templateData.entities) === null || _a === void 0 ? void 0 : _a.forEach(function (entity) {
33
- _super.prototype.generateFile.call(_this, _this.generatorOptions.outputPath + "/" + _.kebabCase(entity.name) + ".model.ts", entity);
34
+ _super.prototype.generateFile.call(_this, "".concat(_this.generatorOptions.outputPath, "/").concat(_.kebabCase(entity.name), ".model.ts"), entity);
34
35
  });
35
36
  };
36
37
  return ModelGenerator;
@@ -21,8 +21,9 @@ var base_generator_1 = require("./base-generator");
21
21
  var ModelPropertiesGenerator = /** @class */ (function (_super) {
22
22
  __extends(ModelPropertiesGenerator, _super);
23
23
  function ModelPropertiesGenerator(options) {
24
+ var _this = this;
24
25
  var _a;
25
- var _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.modelProperties) || this;
26
+ _this = _super.call(this, options, (_a = options.templates) === null || _a === void 0 ? void 0 : _a.modelProperties) || this;
26
27
  _this.GeneratorName = 'ModelPropertiesGenerator';
27
28
  return _this;
28
29
  }
@@ -30,7 +31,7 @@ var ModelPropertiesGenerator = /** @class */ (function (_super) {
30
31
  var _this = this;
31
32
  var _a;
32
33
  (_a = templateData.entities) === null || _a === void 0 ? void 0 : _a.filter(function (val) { var _a, _b; return ((_a = val.valueProperties) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = val.referenceProperties) === null || _b === void 0 ? void 0 : _b.length) > 0; }).forEach(function (entity) {
33
- _super.prototype.generateFile.call(_this, _this.generatorOptions.outputPath + "/" + _.kebabCase(entity.name) + ".properties.ts", entity);
34
+ _super.prototype.generateFile.call(_this, "".concat(_this.generatorOptions.outputPath, "/").concat(_.kebabCase(entity.name), ".properties.ts"), entity);
34
35
  });
35
36
  };
36
37
  return ModelPropertiesGenerator;
package/index.js CHANGED
@@ -38,11 +38,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.generateTsModels = exports.nrsrxValuePropertyTypeFilterCallBack = exports.nrsrxTypeFilterCallBack = void 0;
40
40
  var fs = require("fs");
41
- var node_fetch_1 = require("node-fetch");
42
41
  var generators_1 = require("./generators");
43
42
  var endpoints_generator_1 = require("./generators/endpoints-generator");
44
43
  var generator_options_1 = require("./models/generator-options");
45
44
  var openapidoc_converter_1 = require("./openapidoc-converter");
45
+ var axios_1 = require("axios");
46
46
  var nrsrx_filters_1 = require("./models/nrsrx-filters");
47
47
  Object.defineProperty(exports, "nrsrxTypeFilterCallBack", { enumerable: true, get: function () { return nrsrx_filters_1.nrsrxTypeFilterCallBack; } });
48
48
  Object.defineProperty(exports, "nrsrxValuePropertyTypeFilterCallBack", { enumerable: true, get: function () { return nrsrx_filters_1.nrsrxValuePropertyTypeFilterCallBack; } });
@@ -52,7 +52,7 @@ function generateTsModels(options) {
52
52
  return __generator(this, function (_a) {
53
53
  switch (_a.label) {
54
54
  case 0:
55
- options = generator_options_1.setGeneratorOptionDefaults(options);
55
+ options = (0, generator_options_1.setGeneratorOptionDefaults)(options);
56
56
  return [4 /*yield*/, getOpenApiDocumentAsync(options)];
57
57
  case 1:
58
58
  apiDocument = _a.sent();
@@ -67,35 +67,34 @@ function generateTsModels(options) {
67
67
  exports.generateTsModels = generateTsModels;
68
68
  function getOpenApiDocumentAsync(options) {
69
69
  return __awaiter(this, void 0, void 0, function () {
70
- var apiDoc, response, response;
70
+ var apiDoc, axios, response, response;
71
71
  return __generator(this, function (_a) {
72
72
  switch (_a.label) {
73
73
  case 0:
74
- if (!options.openApiJsonUrl) return [3 /*break*/, 3];
75
- return [4 /*yield*/, node_fetch_1.default(options.openApiJsonUrl)];
74
+ if (!options.openApiJsonUrl) return [3 /*break*/, 2];
75
+ axios = new axios_1.Axios();
76
+ return [4 /*yield*/, axios.get(options.openApiJsonUrl)];
76
77
  case 1:
77
78
  response = _a.sent();
78
- return [4 /*yield*/, response.json()];
79
+ apiDoc = JSON.parse(response.data);
80
+ return [3 /*break*/, 3];
79
81
  case 2:
80
- apiDoc = (_a.sent());
81
- return [3 /*break*/, 4];
82
- case 3:
83
82
  if (options.openApiJsonFileName) {
84
- response = fs.readFileSync(__dirname + "/" + options.openApiJsonFileName);
83
+ response = fs.readFileSync("".concat(__dirname, "/").concat(options.openApiJsonFileName));
85
84
  apiDoc = JSON.parse(response.toString());
86
85
  }
87
86
  else {
88
87
  throw new Error('You must specify either an OpenApi Json Url or FileName. Please review the readme.md @ https://github.com/ikemtz/openapi-ts-generator.');
89
88
  }
90
- _a.label = 4;
91
- case 4: return [2 /*return*/, apiDoc];
89
+ _a.label = 3;
90
+ case 3: return [2 /*return*/, apiDoc];
92
91
  }
93
92
  });
94
93
  });
95
94
  }
96
95
  function generateOutput(options, templateData) {
97
96
  if (fs.existsSync(options.outputPath)) {
98
- fs.readdirSync(options.outputPath).forEach(function (file) { return fs.unlinkSync(options.outputPath + "/" + file); });
97
+ fs.readdirSync(options.outputPath).forEach(function (file) { return fs.unlinkSync("".concat(options.outputPath, "/").concat(file)); });
99
98
  fs.rmdirSync(options.outputPath);
100
99
  }
101
100
  fs.mkdirSync(options.outputPath, { recursive: true });
@@ -20,11 +20,11 @@ function defaultFilter(value, index, array) {
20
20
  exports.defaultFilter = defaultFilter;
21
21
  function setGeneratorOptionDefaults(options) {
22
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
- var templateFolder = path_1.resolve(__dirname + "/..", 'templates');
23
+ var templateFolder = (0, path_1.resolve)("".concat(__dirname, "/.."), 'templates');
24
24
  options.typeFilterCallBack = (_a = options.typeFilterCallBack) !== null && _a !== void 0 ? _a : defaultFilter;
25
25
  options.valuePropertyTypeFilterCallBack = (_b = options.valuePropertyTypeFilterCallBack) !== null && _b !== void 0 ? _b : defaultFilter;
26
26
  options.referencePropertyTypeFilterCallBack = (_c = options.referencePropertyTypeFilterCallBack) !== null && _c !== void 0 ? _c : defaultFilter;
27
- options.templates = __assign(__assign({}, options.templates), { model: (_e = (_d = options.templates) === null || _d === void 0 ? void 0 : _d.model) !== null && _e !== void 0 ? _e : templateFolder + "/model.ts.hbs", formGroupFactory: (_g = (_f = options.templates) === null || _f === void 0 ? void 0 : _f.formGroupFactory) !== null && _g !== void 0 ? _g : templateFolder + "/form-group-factory.ts.hbs", barrel: (_j = (_h = options.templates) === null || _h === void 0 ? void 0 : _h.barrel) !== null && _j !== void 0 ? _j : templateFolder + "/index.ts.hbs", enum: (_l = (_k = options.templates) === null || _k === void 0 ? void 0 : _k.barrel) !== null && _l !== void 0 ? _l : templateFolder + "/enum.ts.hbs", modelProperties: (_o = (_m = options.templates) === null || _m === void 0 ? void 0 : _m.barrel) !== null && _o !== void 0 ? _o : templateFolder + "/model-properties.ts.hbs", endpoints: (_q = (_p = options.templates) === null || _p === void 0 ? void 0 : _p.endpoints) !== null && _q !== void 0 ? _q : templateFolder + "/endpoints.ts.hbs" });
27
+ options.templates = __assign(__assign({}, options.templates), { model: (_e = (_d = options.templates) === null || _d === void 0 ? void 0 : _d.model) !== null && _e !== void 0 ? _e : "".concat(templateFolder, "/model.ts.hbs"), formGroupFactory: (_g = (_f = options.templates) === null || _f === void 0 ? void 0 : _f.formGroupFactory) !== null && _g !== void 0 ? _g : "".concat(templateFolder, "/form-group-factory.ts.hbs"), barrel: (_j = (_h = options.templates) === null || _h === void 0 ? void 0 : _h.barrel) !== null && _j !== void 0 ? _j : "".concat(templateFolder, "/index.ts.hbs"), enum: (_l = (_k = options.templates) === null || _k === void 0 ? void 0 : _k.barrel) !== null && _l !== void 0 ? _l : "".concat(templateFolder, "/enum.ts.hbs"), modelProperties: (_o = (_m = options.templates) === null || _m === void 0 ? void 0 : _m.barrel) !== null && _o !== void 0 ? _o : "".concat(templateFolder, "/model-properties.ts.hbs"), endpoints: (_q = (_p = options.templates) === null || _p === void 0 ? void 0 : _p.endpoints) !== null && _q !== void 0 ? _q : "".concat(templateFolder, "/endpoints.ts.hbs") });
28
28
  return options;
29
29
  }
30
30
  exports.setGeneratorOptionDefaults = setGeneratorOptionDefaults;
@@ -65,12 +65,14 @@ var OpenApiDocConverter = /** @class */ (function () {
65
65
  schemaWrapperInfo.propertySchemaObject.type !== 'array') {
66
66
  schemaWrapperInfo.valueProperties.push(this.convertSchemaObjectToPropertyType(propertyName, schemaWrapperInfo));
67
67
  }
68
- else if ((schemaWrapperInfo.propertyReferenceObject = schemaWrapperInfo.componentSchemaObject.properties[propertyName])
69
- .$ref) {
70
- schemaWrapperInfo.referenceProperties.push(this.convertReferenceObjectToPropertyType(propertyName, schemaWrapperInfo));
71
- }
72
- else if (schemaWrapperInfo.propertySchemaObject.type === 'array' && schemaWrapperInfo.propertySchemaObject.items) {
73
- this.convertArray(propertyName, schemaWrapperInfo);
68
+ else {
69
+ schemaWrapperInfo.propertyReferenceObject = schemaWrapperInfo.componentSchemaObject.properties[propertyName];
70
+ if (schemaWrapperInfo.propertyReferenceObject.$ref) {
71
+ schemaWrapperInfo.referenceProperties.push(this.convertReferenceObjectToPropertyType(propertyName, schemaWrapperInfo));
72
+ }
73
+ else if (schemaWrapperInfo.propertySchemaObject.type === 'array' && schemaWrapperInfo.propertySchemaObject.items) {
74
+ this.convertArray(propertyName, schemaWrapperInfo);
75
+ }
74
76
  }
75
77
  }
76
78
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "openapi-ts-generator",
3
- "version": "3.197.5",
3
+ "version": "4.80.2",
4
4
  "description": "Based on swagger-ts-generator, this is a type script model generator specifically for services with OpenApi spec documentation.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
8
  "build": "npm run format && npm run lint && tsc && cp -rfv ./src/templates ./lib",
9
9
  "format": "prettier --write \"src/**/*.ts\"",
10
- "lint": "eslint . --ext .ts",
10
+ "lint": "eslint . --ext .ts --output-file ./eslint-report.json --format json",
11
11
  "test": "npm run build && jest --collect-coverage",
12
12
  "prep:lib": "rm -rv ./lib/*.spec.* && rm -rv ./lib/**/*.spec.* && cp -v ./package.json ./lib/ && cp -v ./LICENSE ./lib/ && cp -v ./README.md ./lib/",
13
13
  "debug": "npm run build && node --inspect-brk ./lib/app.js"
@@ -36,34 +36,34 @@
36
36
  ],
37
37
  "homepage": "https://github.com/ikemtz/OpenApi-TS-Generator#readme",
38
38
  "devDependencies": {
39
- "@types/jest": "^26.0.22",
40
- "@types/lodash": "^4.14.168",
41
- "@types/node": "^15.9.0",
42
- "@types/node-fetch": "^2.5.7",
43
- "@typescript-eslint/eslint-plugin": "4.26",
44
- "@typescript-eslint/parser": "4.26",
45
- "eslint": "^7.23.0",
46
- "eslint-config-prettier": "^8.1.0",
39
+ "@types/jest": "^27.4.1",
40
+ "@types/lodash": "^4.14.180",
41
+ "@types/node": "^16.11.26",
42
+ "@typescript-eslint/eslint-plugin": "^5.16.0",
43
+ "@typescript-eslint/parser": "^5.16.0",
44
+ "eslint": "^8.11.0",
45
+ "eslint-config-prettier": "^8.5.0",
47
46
  "eslint-config-standard": "^16.0.2",
48
- "eslint-plugin-import": "^2.23.4",
47
+ "eslint-plugin-import": "^2.25.4",
49
48
  "eslint-plugin-node": "^11.1.0",
50
- "eslint-plugin-promise": "^5.1.0",
51
- "jest": "^27.0.3",
52
- "jest-junit": "^12.1.0",
53
- "openapi3-ts": "^2.0.1",
54
- "prettier": "^2.2.1",
55
- "rxjs": "^7.1.0",
56
- "ts-jest": "^27.0.2",
57
- "typescript": "^4.3.2"
49
+ "eslint-plugin-promise": "^6.0.0",
50
+ "jest": "^27.5.1",
51
+ "jest-junit": "^13.0.0",
52
+ "openapi3-ts": "^2.0.2",
53
+ "prettier": "^2.6.0",
54
+ "rxjs": "^7.5.5",
55
+ "ts-jest": "^27.1.3",
56
+ "typescript": "^4.6.2"
58
57
  },
59
58
  "dependencies": {
60
- "handlebars": "^4.x",
61
- "lodash": "^4.x",
62
- "node-fetch": "^2.x"
59
+ "axios": ">=0.x",
60
+ "handlebars": ">=4.x",
61
+ "lodash": ">=4.x"
63
62
  },
64
63
  "peerDependencies": {
65
- "handlebars": "^4.x",
66
- "lodash": "^4.x",
67
- "node-fetch": "^2.x"
64
+ "axios": ">=0.x",
65
+ "handlebars": ">=4.x",
66
+ "lodash": ">=4.x",
67
+ "rxjs": ">=6.x"
68
68
  }
69
69
  }
@@ -12,6 +12,6 @@ export enum Endpoints {
12
12
  }
13
13
  export interface IEndpoints {
14
14
  {{#paths}}
15
- {{tag}}: string;
15
+ readonly {{tag}}: string;
16
16
  {{/paths}}
17
17
  }