@trapi/swagger 1.0.0-alpha.11 → 1.0.0-alpha.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/config/index.d.ts +2 -2
- package/dist/config/index.js +24 -24
- package/dist/config/type.d.ts +82 -82
- package/dist/config/type.js +8 -8
- package/dist/config/utils.d.ts +2 -2
- package/dist/config/utils.js +53 -53
- package/dist/constants.d.ts +14 -14
- package/dist/constants.js +26 -26
- package/dist/generator/abstract.d.ts +34 -34
- package/dist/generator/abstract.js +251 -251
- package/dist/generator/index.d.ts +4 -4
- package/dist/generator/index.js +26 -26
- package/dist/generator/module.d.ts +13 -13
- package/dist/generator/module.js +34 -34
- package/dist/generator/v2/index.d.ts +1 -1
- package/dist/generator/v2/index.js +23 -23
- package/dist/generator/v2/module.d.ts +24 -24
- package/dist/generator/v2/module.js +516 -516
- package/dist/generator/v3/index.d.ts +1 -1
- package/dist/generator/v3/index.js +23 -23
- package/dist/generator/v3/module.d.ts +29 -29
- package/dist/generator/v3/module.js +498 -498
- package/dist/index.d.ts +7 -7
- package/dist/index.js +29 -29
- package/dist/metadata.d.ts +3 -3
- package/dist/metadata.js +13 -13
- package/dist/schema/constants.d.ts +27 -27
- package/dist/schema/constants.js +39 -39
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +26 -26
- package/dist/schema/type.d.ts +138 -138
- package/dist/schema/type.js +8 -8
- package/dist/schema/v2/constants.d.ts +7 -7
- package/dist/schema/v2/constants.js +17 -17
- package/dist/schema/v2/index.d.ts +2 -2
- package/dist/schema/v2/index.js +24 -24
- package/dist/schema/v2/type.d.ts +115 -115
- package/dist/schema/v2/type.js +8 -8
- package/dist/schema/v3/constants.d.ts +6 -6
- package/dist/schema/v3/constants.js +16 -16
- package/dist/schema/v3/index.d.ts +2 -2
- package/dist/schema/v3/index.js +24 -24
- package/dist/schema/v3/type.d.ts +158 -158
- package/dist/schema/v3/type.js +8 -8
- package/dist/type.d.ts +48 -48
- package/dist/type.js +8 -8
- package/dist/utils/character.d.ts +2 -2
- package/dist/utils/character.js +20 -20
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.js +26 -26
- package/dist/utils/object.d.ts +1 -1
- package/dist/utils/object.js +14 -14
- package/dist/utils/path.d.ts +1 -1
- package/dist/utils/path.js +20 -20
- package/dist/utils/value.d.ts +1 -1
- package/dist/utils/value.js +25 -25
- package/package.json +4 -4
package/dist/utils/value.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.transformValueTo = void 0;
|
|
10
|
-
function transformValueTo(type, value) {
|
|
11
|
-
if (value === null) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
switch (type) {
|
|
15
|
-
case 'integer':
|
|
16
|
-
case 'number':
|
|
17
|
-
return Number(value);
|
|
18
|
-
case 'boolean':
|
|
19
|
-
return !!value;
|
|
20
|
-
case 'string':
|
|
21
|
-
default:
|
|
22
|
-
return String(value);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.transformValueTo = transformValueTo;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
4
|
+
* Author Peter Placzek (tada5hi)
|
|
5
|
+
* For the full copyright and license information,
|
|
6
|
+
* view the LICENSE file that was distributed with this source code.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.transformValueTo = void 0;
|
|
10
|
+
function transformValueTo(type, value) {
|
|
11
|
+
if (value === null) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
switch (type) {
|
|
15
|
+
case 'integer':
|
|
16
|
+
case 'number':
|
|
17
|
+
return Number(value);
|
|
18
|
+
case 'boolean':
|
|
19
|
+
return !!value;
|
|
20
|
+
case 'string':
|
|
21
|
+
default:
|
|
22
|
+
return String(value);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.transformValueTo = transformValueTo;
|
|
26
26
|
//# sourceMappingURL=value.js.map
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/tada5hi"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"version": "1.0.0-alpha.
|
|
9
|
+
"version": "1.0.0-alpha.12",
|
|
10
10
|
"description": "Generate Swagger files from a decorator APIs.",
|
|
11
11
|
"keywords": [
|
|
12
12
|
"typescript",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@types/yamljs": "^0.2.31",
|
|
40
40
|
"jest": "^27.5.1",
|
|
41
41
|
"jsonata": "^2.0.2",
|
|
42
|
-
"locter": "^1.0.
|
|
42
|
+
"locter": "^1.0.10"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@trapi/metadata": "^1.0.0-alpha.
|
|
45
|
+
"@trapi/metadata": "^1.0.0-alpha.8",
|
|
46
46
|
"smob": "^0.1.0",
|
|
47
47
|
"yamljs": "^0.3.0"
|
|
48
48
|
},
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"engineStrict": true,
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "9629f2cf38e8fe548b8f6ff5f1a9571cb2099af8"
|
|
66
66
|
}
|