@trapi/swagger 1.0.0-alpha.9 → 1.0.0

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 (71) 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/constants.js.map +1 -1
  10. package/dist/generator/abstract.d.ts +34 -28
  11. package/dist/generator/abstract.d.ts.map +1 -1
  12. package/dist/generator/abstract.js +251 -253
  13. package/dist/generator/abstract.js.map +1 -1
  14. package/dist/generator/index.d.ts +4 -4
  15. package/dist/generator/index.js +26 -26
  16. package/dist/generator/module.d.ts +13 -13
  17. package/dist/generator/module.js +34 -34
  18. package/dist/generator/v2/index.d.ts +1 -1
  19. package/dist/generator/v2/index.js +23 -23
  20. package/dist/generator/v2/module.d.ts +24 -25
  21. package/dist/generator/v2/module.d.ts.map +1 -1
  22. package/dist/generator/v2/module.js +516 -484
  23. package/dist/generator/v2/module.js.map +1 -1
  24. package/dist/generator/v3/index.d.ts +1 -1
  25. package/dist/generator/v3/index.js +23 -23
  26. package/dist/generator/v3/module.d.ts +29 -29
  27. package/dist/generator/v3/module.d.ts.map +1 -1
  28. package/dist/generator/v3/module.js +498 -462
  29. package/dist/generator/v3/module.js.map +1 -1
  30. package/dist/index.d.ts +7 -7
  31. package/dist/index.js +29 -29
  32. package/dist/metadata.d.ts +3 -3
  33. package/dist/metadata.js +13 -13
  34. package/dist/schema/constants.d.ts +27 -6
  35. package/dist/schema/constants.d.ts.map +1 -1
  36. package/dist/schema/constants.js +39 -16
  37. package/dist/schema/constants.js.map +1 -1
  38. package/dist/schema/index.d.ts +4 -4
  39. package/dist/schema/index.js +26 -26
  40. package/dist/schema/type.d.ts +138 -139
  41. package/dist/schema/type.d.ts.map +1 -1
  42. package/dist/schema/type.js +8 -8
  43. package/dist/schema/v2/constants.d.ts +7 -7
  44. package/dist/schema/v2/constants.js +17 -17
  45. package/dist/schema/v2/constants.js.map +1 -1
  46. package/dist/schema/v2/index.d.ts +2 -2
  47. package/dist/schema/v2/index.js +24 -24
  48. package/dist/schema/v2/type.d.ts +115 -115
  49. package/dist/schema/v2/type.d.ts.map +1 -1
  50. package/dist/schema/v2/type.js +8 -8
  51. package/dist/schema/v3/constants.d.ts +6 -6
  52. package/dist/schema/v3/constants.js +16 -16
  53. package/dist/schema/v3/constants.js.map +1 -1
  54. package/dist/schema/v3/index.d.ts +2 -2
  55. package/dist/schema/v3/index.js +24 -24
  56. package/dist/schema/v3/type.d.ts +158 -157
  57. package/dist/schema/v3/type.d.ts.map +1 -1
  58. package/dist/schema/v3/type.js +8 -8
  59. package/dist/type.d.ts +48 -48
  60. package/dist/type.js +8 -8
  61. package/dist/utils/character.d.ts +2 -2
  62. package/dist/utils/character.js +20 -20
  63. package/dist/utils/index.d.ts +4 -4
  64. package/dist/utils/index.js +26 -26
  65. package/dist/utils/object.d.ts +1 -1
  66. package/dist/utils/object.js +14 -14
  67. package/dist/utils/path.d.ts +1 -1
  68. package/dist/utils/path.js +20 -20
  69. package/dist/utils/value.d.ts +1 -1
  70. package/dist/utils/value.js +25 -25
  71. package/package.json +8 -8
@@ -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.9",
9
+ "version": "1.0.0",
10
10
  "description": "Generate Swagger files from a decorator APIs.",
11
11
  "keywords": [
12
12
  "typescript",
@@ -36,14 +36,14 @@
36
36
  "preblushOnly": "npm run build"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/yamljs": "^0.2.31",
40
- "jest": "^27.5.1",
41
- "jsonata": "^2.0.2",
42
- "locter": "^1.0.9"
39
+ "@types/yamljs": "^0.2.34",
40
+ "jest": "^29.6.1",
41
+ "jsonata": "^2.0.3",
42
+ "locter": "^1.2.3"
43
43
  },
44
44
  "dependencies": {
45
- "@trapi/metadata": "^1.0.0-alpha.6",
46
- "smob": "^0.1.0",
45
+ "@trapi/metadata": "^1.0.0",
46
+ "smob": "^1.4.0",
47
47
  "yamljs": "^0.3.0"
48
48
  },
49
49
  "repository": {
@@ -62,5 +62,5 @@
62
62
  "access": "public"
63
63
  },
64
64
  "engineStrict": true,
65
- "gitHead": "52459504128902893750a0c4bd3cc59d2a6e4fb3"
65
+ "gitHead": "779e4c4379373450030bc4cd0d69e274de174783"
66
66
  }