@trapi/swagger 1.0.0-alpha.10 → 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.
Files changed (68) hide show
  1. package/dist/config/index.d.ts +2 -2
  2. package/dist/config/index.js +24 -24
  3. package/dist/config/type.d.ts +82 -82
  4. package/dist/config/type.js +8 -8
  5. package/dist/config/utils.d.ts +2 -2
  6. package/dist/config/utils.js +53 -53
  7. package/dist/constants.d.ts +14 -14
  8. package/dist/constants.js +26 -26
  9. package/dist/generator/abstract.d.ts +34 -28
  10. package/dist/generator/abstract.d.ts.map +1 -1
  11. package/dist/generator/abstract.js +251 -214
  12. package/dist/generator/abstract.js.map +1 -1
  13. package/dist/generator/index.d.ts +4 -4
  14. package/dist/generator/index.js +26 -26
  15. package/dist/generator/module.d.ts +13 -13
  16. package/dist/generator/module.js +34 -34
  17. package/dist/generator/v2/index.d.ts +1 -1
  18. package/dist/generator/v2/index.js +23 -23
  19. package/dist/generator/v2/module.d.ts +24 -26
  20. package/dist/generator/v2/module.d.ts.map +1 -1
  21. package/dist/generator/v2/module.js +516 -516
  22. package/dist/generator/v2/module.js.map +1 -1
  23. package/dist/generator/v3/index.d.ts +1 -1
  24. package/dist/generator/v3/index.js +23 -23
  25. package/dist/generator/v3/module.d.ts +29 -30
  26. package/dist/generator/v3/module.d.ts.map +1 -1
  27. package/dist/generator/v3/module.js +498 -507
  28. package/dist/generator/v3/module.js.map +1 -1
  29. package/dist/index.d.ts +7 -7
  30. package/dist/index.js +29 -29
  31. package/dist/metadata.d.ts +3 -3
  32. package/dist/metadata.js +13 -13
  33. package/dist/schema/constants.d.ts +27 -6
  34. package/dist/schema/constants.d.ts.map +1 -1
  35. package/dist/schema/constants.js +39 -16
  36. package/dist/schema/constants.js.map +1 -1
  37. package/dist/schema/index.d.ts +4 -4
  38. package/dist/schema/index.js +26 -26
  39. package/dist/schema/type.d.ts +138 -139
  40. package/dist/schema/type.d.ts.map +1 -1
  41. package/dist/schema/type.js +8 -8
  42. package/dist/schema/v2/constants.d.ts +7 -7
  43. package/dist/schema/v2/constants.js +17 -17
  44. package/dist/schema/v2/index.d.ts +2 -2
  45. package/dist/schema/v2/index.js +24 -24
  46. package/dist/schema/v2/type.d.ts +115 -115
  47. package/dist/schema/v2/type.d.ts.map +1 -1
  48. package/dist/schema/v2/type.js +8 -8
  49. package/dist/schema/v3/constants.d.ts +6 -6
  50. package/dist/schema/v3/constants.js +16 -16
  51. package/dist/schema/v3/index.d.ts +2 -2
  52. package/dist/schema/v3/index.js +24 -24
  53. package/dist/schema/v3/type.d.ts +158 -157
  54. package/dist/schema/v3/type.d.ts.map +1 -1
  55. package/dist/schema/v3/type.js +8 -8
  56. package/dist/type.d.ts +48 -48
  57. package/dist/type.js +8 -8
  58. package/dist/utils/character.d.ts +2 -2
  59. package/dist/utils/character.js +20 -20
  60. package/dist/utils/index.d.ts +4 -4
  61. package/dist/utils/index.js +26 -26
  62. package/dist/utils/object.d.ts +1 -1
  63. package/dist/utils/object.js +14 -14
  64. package/dist/utils/path.d.ts +1 -1
  65. package/dist/utils/path.js +20 -20
  66. package/dist/utils/value.d.ts +1 -1
  67. package/dist/utils/value.js +25 -25
  68. package/package.json +4 -4
@@ -1,21 +1,21 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021-2022.
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.normalizePathParameters = void 0;
10
- function normalizePathParameters(str) {
11
- // <:id> -> {id}
12
- // todo: maybe escaping / is necessary
13
- str = str.replace(/<:([^/]+)>/g, '{$1}');
14
- // :id -> {id}
15
- str = str.replace(/:([^/]+)/g, '{$1}');
16
- // <id> -> {id}
17
- str = str.replace(/<([^/]+)>/g, '{$1}');
18
- return str;
19
- }
20
- exports.normalizePathParameters = normalizePathParameters;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021-2022.
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.normalizePathParameters = void 0;
10
+ function normalizePathParameters(str) {
11
+ // <:id> -> {id}
12
+ // todo: maybe escaping / is necessary
13
+ str = str.replace(/<:([^/]+)>/g, '{$1}');
14
+ // :id -> {id}
15
+ str = str.replace(/:([^/]+)/g, '{$1}');
16
+ // <id> -> {id}
17
+ str = str.replace(/<([^/]+)>/g, '{$1}');
18
+ return str;
19
+ }
20
+ exports.normalizePathParameters = normalizePathParameters;
21
21
  //# sourceMappingURL=path.js.map
@@ -1,2 +1,2 @@
1
- export declare function transformValueTo(type: 'string' | 'number' | 'integer' | 'boolean' | 'bigint', value: unknown): string | number | boolean | null;
1
+ export declare function transformValueTo(type: 'string' | 'number' | 'integer' | 'boolean' | 'bigint', value: unknown): string | number | boolean | null;
2
2
  //# sourceMappingURL=value.d.ts.map
@@ -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.10",
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.9"
42
+ "locter": "^1.0.10"
43
43
  },
44
44
  "dependencies": {
45
- "@trapi/metadata": "^1.0.0-alpha.6",
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": "36b39b607219489aa4f5eab2cb5e66f1f9602726"
65
+ "gitHead": "9629f2cf38e8fe548b8f6ff5f1a9571cb2099af8"
66
66
  }