openapi-ts-generator 7.59.2 → 7.284.3
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/interfaces/enum-value.d.ts +5 -0
- package/interfaces/enum-value.js +2 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.js +17 -0
- package/package.json +19 -7
- package/templates/enum.ts.hbs +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enum-value';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enum-value"), exports);
|
package/package.json
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-ts-generator",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.284.3",
|
|
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
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"types": "./index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./interfaces": {
|
|
14
|
+
"import": "./interfaces/index.js",
|
|
15
|
+
"require": "./interfaces/index.js",
|
|
16
|
+
"types": "./interfaces/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"scripts": {
|
|
8
20
|
"build": "npm run format && npm run lint && tsc && cp -rfv ./src/templates ./lib",
|
|
9
21
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
@@ -38,23 +50,23 @@
|
|
|
38
50
|
"homepage": "https://github.com/ikemtz/OpenApi-TS-Generator#readme",
|
|
39
51
|
"devDependencies": {
|
|
40
52
|
"@types/jest": "^27.5.2",
|
|
41
|
-
"@types/lodash": "^4.
|
|
53
|
+
"@types/lodash": "^4.17.10",
|
|
42
54
|
"@types/node": "^20.11.21",
|
|
43
55
|
"@types/pluralize": "^0.0.33",
|
|
44
56
|
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
45
57
|
"@typescript-eslint/parser": "^7.1.0",
|
|
46
|
-
"eslint": "
|
|
58
|
+
"eslint": "8.56",
|
|
47
59
|
"eslint-config-prettier": "^9.1.0",
|
|
48
60
|
"eslint-config-standard": "^17.1.0",
|
|
49
61
|
"eslint-plugin-import": "^2.29.1",
|
|
50
62
|
"eslint-plugin-node": "^11.1.0",
|
|
51
|
-
"eslint-plugin-promise": "^6.
|
|
52
|
-
"jest": "^
|
|
63
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
64
|
+
"jest": "^29.7.0",
|
|
53
65
|
"jest-junit": "^13.2.0",
|
|
54
66
|
"openapi3-ts": "^4.2.2",
|
|
55
|
-
"prettier": "^3.
|
|
67
|
+
"prettier": "^3.3.3",
|
|
56
68
|
"rxjs": "^7.6.0",
|
|
57
|
-
"ts-jest": "^
|
|
69
|
+
"ts-jest": "^29.2.5",
|
|
58
70
|
"typescript": "^4.9.5"
|
|
59
71
|
},
|
|
60
72
|
"dependencies": {
|
package/templates/enum.ts.hbs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* For issues or feature request, visit the repo: https://github.com/ikemtz/openapi-ts-generator
|
|
6
6
|
* Do not edit.
|
|
7
7
|
*/
|
|
8
|
+
import { IEnumValue } from 'openapi-ts-generator/interfaces';
|
|
8
9
|
|
|
9
10
|
{{#if description}}/**
|
|
10
11
|
* {{description}}
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
{{/enumValues}}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
export const {{{camelSingularName}}}Values = [
|
|
34
|
+
export const {{{camelSingularName}}}Values : IEnumValue[] = [
|
|
34
35
|
{{#enumValues}}
|
|
35
36
|
{ key: {{key}}, name: '{{name}}', displayText: '{{titleName}}'},
|
|
36
37
|
{{/enumValues}}
|