@tsed/schema 6.105.2 → 6.106.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 (75) hide show
  1. package/jest.config.js +4 -4
  2. package/lib/cjs/components/schemaMapper.js +1 -3
  3. package/lib/cjs/components/schemaMapper.js.map +1 -1
  4. package/lib/cjs/domain/JsonOperation.js +3 -18
  5. package/lib/cjs/domain/JsonOperation.js.map +1 -1
  6. package/lib/cjs/domain/JsonParameter.js +8 -54
  7. package/lib/cjs/domain/JsonParameter.js.map +1 -1
  8. package/lib/cjs/domain/JsonResponse.js +1 -11
  9. package/lib/cjs/domain/JsonResponse.js.map +1 -1
  10. package/lib/cjs/domain/SpecTypes.js +0 -3
  11. package/lib/cjs/domain/SpecTypes.js.map +1 -1
  12. package/lib/cjs/index.js +6 -0
  13. package/lib/cjs/index.js.map +1 -1
  14. package/lib/cjs/utils/generateSpec.js +55 -0
  15. package/lib/cjs/utils/generateSpec.js.map +1 -0
  16. package/lib/cjs/utils/getOperationsRoutes.js +2 -1
  17. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -1
  18. package/lib/cjs/utils/getSpec.js +58 -43
  19. package/lib/cjs/utils/getSpec.js.map +1 -1
  20. package/lib/cjs/utils/getSpecType.js +21 -0
  21. package/lib/cjs/utils/getSpecType.js.map +1 -0
  22. package/lib/cjs/utils/mapNullableType.js +0 -5
  23. package/lib/cjs/utils/mapNullableType.js.map +1 -1
  24. package/lib/cjs/utils/mapOpenSpec.js +41 -0
  25. package/lib/cjs/utils/mapOpenSpec.js.map +1 -0
  26. package/lib/cjs/utils/mapOpenSpec2.js +34 -0
  27. package/lib/cjs/utils/mapOpenSpec2.js.map +1 -0
  28. package/lib/cjs/utils/mapOpenSpec3.js +26 -0
  29. package/lib/cjs/utils/mapOpenSpec3.js.map +1 -0
  30. package/lib/cjs/utils/mapOpenSpecInfo.js +21 -0
  31. package/lib/cjs/utils/mapOpenSpecInfo.js.map +1 -0
  32. package/lib/cjs/utils/mergeOperation.js +1 -0
  33. package/lib/cjs/utils/mergeOperation.js.map +1 -1
  34. package/lib/esm/components/schemaMapper.js +1 -3
  35. package/lib/esm/components/schemaMapper.js.map +1 -1
  36. package/lib/esm/domain/JsonOperation.js +3 -18
  37. package/lib/esm/domain/JsonOperation.js.map +1 -1
  38. package/lib/esm/domain/JsonParameter.js +8 -54
  39. package/lib/esm/domain/JsonParameter.js.map +1 -1
  40. package/lib/esm/domain/JsonResponse.js +1 -11
  41. package/lib/esm/domain/JsonResponse.js.map +1 -1
  42. package/lib/esm/domain/SpecTypes.js +0 -3
  43. package/lib/esm/domain/SpecTypes.js.map +1 -1
  44. package/lib/esm/index.js +6 -0
  45. package/lib/esm/index.js.map +1 -1
  46. package/lib/esm/utils/generateSpec.js +50 -0
  47. package/lib/esm/utils/generateSpec.js.map +1 -0
  48. package/lib/esm/utils/getOperationsRoutes.js +2 -1
  49. package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
  50. package/lib/esm/utils/getSpec.js +59 -44
  51. package/lib/esm/utils/getSpec.js.map +1 -1
  52. package/lib/esm/utils/getSpecType.js +16 -0
  53. package/lib/esm/utils/getSpecType.js.map +1 -0
  54. package/lib/esm/utils/mapNullableType.js +0 -5
  55. package/lib/esm/utils/mapNullableType.js.map +1 -1
  56. package/lib/esm/utils/mapOpenSpec.js +37 -0
  57. package/lib/esm/utils/mapOpenSpec.js.map +1 -0
  58. package/lib/esm/utils/mapOpenSpec2.js +30 -0
  59. package/lib/esm/utils/mapOpenSpec2.js.map +1 -0
  60. package/lib/esm/utils/mapOpenSpec3.js +22 -0
  61. package/lib/esm/utils/mapOpenSpec3.js.map +1 -0
  62. package/lib/esm/utils/mapOpenSpecInfo.js +17 -0
  63. package/lib/esm/utils/mapOpenSpecInfo.js.map +1 -0
  64. package/lib/esm/utils/mergeOperation.js +1 -0
  65. package/lib/esm/utils/mergeOperation.js.map +1 -1
  66. package/lib/types/domain/SpecTypes.d.ts +0 -3
  67. package/lib/types/index.d.ts +6 -0
  68. package/lib/types/utils/generateSpec.d.ts +16 -0
  69. package/lib/types/utils/getSpec.d.ts +5 -24
  70. package/lib/types/utils/getSpecType.d.ts +12 -0
  71. package/lib/types/utils/mapOpenSpec.d.ts +10 -0
  72. package/lib/types/utils/mapOpenSpec2.d.ts +9 -0
  73. package/lib/types/utils/mapOpenSpec3.d.ts +8 -0
  74. package/lib/types/utils/mapOpenSpecInfo.d.ts +6 -0
  75. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"mapNullableType.js","sourceRoot":"","sources":["../../../src/utils/mapNullableType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAG9C,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAQ,EAAE,MAAyB,EAAE,OAA0B;IAC7F,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,CAAA,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;IACD,IAAI,KAAK,GAAa,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE1D,QAAQ,OAAO,CAAC,QAAQ,EAAE;QACxB,KAAK,SAAS,CAAC,OAAO;YACpB,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;gBAC3B,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;aACrC;YACD,MAAM;QACR,QAAQ;QACR,KAAK,SAAS,CAAC,IAAI;YACjB,IAAI,GAAG,CAAC,KAAK,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;oBACrB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;wBAChB,IAAI,EAAE,MAAM;qBACb,CAAC,CAAC;iBACJ;aACF;iBAAM;gBACL,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;aACrC;YACD,MAAM;QAER,KAAK,SAAS,CAAC,OAAO;YACpB,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;YAEpB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE;gBACd,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC,CAAC;oBAC1C,OAAO,GAAG,CAAC,IAAI,CAAC;iBACjB;qBAAM;oBACL,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;iBACrB;aACF;YACD,MAAM;KACT;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {uniq} from \"@tsed/core\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nfunction hasNullable(obj: any) {\n return obj.oneOf.find((o: any) => o.type === \"null\");\n}\n\nexport function mapNullableType(obj: any, schema: JsonSchema | null, options: JsonSchemaOptions) {\n if (!schema?.isNullable) {\n return obj;\n }\n let types: string[] = [].concat(obj.type).filter(Boolean);\n\n switch (options.specType) {\n case SpecTypes.SWAGGER:\n if (!obj.allOf && !obj.$ref) {\n obj.type = uniq([\"null\", ...types]);\n }\n break;\n default:\n case SpecTypes.JSON:\n if (obj.oneOf) {\n if (!hasNullable(obj)) {\n obj.oneOf.unshift({\n type: \"null\"\n });\n }\n } else {\n obj.type = uniq([\"null\", ...types]);\n }\n break;\n\n case SpecTypes.OPENAPI:\n obj.nullable = true;\n\n if (!obj.oneOf) {\n if (types.length > 1) {\n obj.oneOf = types.map((type) => ({type}));\n delete obj.type;\n } else {\n obj.type = types[0];\n }\n }\n break;\n }\n\n return obj;\n}\n"]}
1
+ {"version":3,"file":"mapNullableType.js","sourceRoot":"","sources":["../../../src/utils/mapNullableType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAG9C,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAQ,EAAE,MAAyB,EAAE,OAA0B;IAC7F,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,CAAA,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;IACD,IAAI,KAAK,GAAa,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE1D,QAAQ,OAAO,CAAC,QAAQ,EAAE;QACxB,QAAQ;QACR,KAAK,SAAS,CAAC,IAAI;YACjB,IAAI,GAAG,CAAC,KAAK,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;oBACrB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;wBAChB,IAAI,EAAE,MAAM;qBACb,CAAC,CAAC;iBACJ;aACF;iBAAM;gBACL,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;aACrC;YACD,MAAM;QAER,KAAK,SAAS,CAAC,OAAO;YACpB,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;YAEpB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE;gBACd,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC,CAAC;oBAC1C,OAAO,GAAG,CAAC,IAAI,CAAC;iBACjB;qBAAM;oBACL,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;iBACrB;aACF;YACD,MAAM;KACT;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {uniq} from \"@tsed/core\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nfunction hasNullable(obj: any) {\n return obj.oneOf.find((o: any) => o.type === \"null\");\n}\n\nexport function mapNullableType(obj: any, schema: JsonSchema | null, options: JsonSchemaOptions) {\n if (!schema?.isNullable) {\n return obj;\n }\n let types: string[] = [].concat(obj.type).filter(Boolean);\n\n switch (options.specType) {\n default:\n case SpecTypes.JSON:\n if (obj.oneOf) {\n if (!hasNullable(obj)) {\n obj.oneOf.unshift({\n type: \"null\"\n });\n }\n } else {\n obj.type = uniq([\"null\", ...types]);\n }\n break;\n\n case SpecTypes.OPENAPI:\n obj.nullable = true;\n\n if (!obj.oneOf) {\n if (types.length > 1) {\n obj.oneOf = types.map((type) => ({type}));\n delete obj.type;\n } else {\n obj.type = types[0];\n }\n }\n break;\n }\n\n return obj;\n}\n"]}
@@ -0,0 +1,37 @@
1
+ import { getValue, setValue } from "@tsed/core";
2
+ import { getSpecType } from "./getSpecType.js";
3
+ import { mapOpenSpec2 } from "./mapOpenSpec2.js";
4
+ import { SpecTypes } from "../domain/SpecTypes.js";
5
+ import { mapOpenSpec3 } from "./mapOpenSpec3.js";
6
+ import { mergeSpec } from "./mergeSpec.js";
7
+ /**
8
+ * @ignore
9
+ * @param spec
10
+ * @param fileSpec
11
+ * @param version
12
+ * @param acceptMimes
13
+ * @param specVersion
14
+ */
15
+ export function mapOpenSpec(spec, { fileSpec, acceptMimes, specVersion, version }) {
16
+ specVersion = specVersion || getValue(spec, "openapi", getValue(spec, "swagger", "2.0"));
17
+ const options = {
18
+ specVersion,
19
+ acceptMimes
20
+ };
21
+ switch (getSpecType(specVersion)) {
22
+ case SpecTypes.OPENAPI:
23
+ spec = mapOpenSpec3(spec, options);
24
+ fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;
25
+ break;
26
+ default:
27
+ case SpecTypes.SWAGGER:
28
+ spec = mapOpenSpec2(spec, options);
29
+ fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;
30
+ break;
31
+ }
32
+ spec = mergeSpec(spec, fileSpec);
33
+ setValue(spec, "info.title", getValue(spec, "info.title", "Api documentation"));
34
+ setValue(spec, "info.version", getValue(spec, "info.version", version));
35
+ return spec;
36
+ }
37
+ //# sourceMappingURL=mapOpenSpec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapOpenSpec.js","sourceRoot":"","sources":["../../../src/utils/mapOpenSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,IAAS,EAAE,EAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAM;IACvF,WAAW,GAAG,WAAW,IAAI,QAAQ,CAAmB,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAE3G,MAAM,OAAO,GAAG;QACd,WAAW;QACX,WAAW;KACZ,CAAC;IAEF,QAAQ,WAAW,CAAC,WAAW,CAAC,EAAE;QAChC,KAAK,SAAS,CAAC,OAAO;YACpB,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACnC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjE,MAAM;QACR,QAAQ;QACR,KAAK,SAAS,CAAC,OAAO;YACpB,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACnC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjE,MAAM;KACT;IAED,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEjC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;IAExE,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {getValue, setValue} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3, OpenSpecVersions} from \"@tsed/openspec\";\nimport {getSpecType} from \"./getSpecType\";\nimport {mapOpenSpec2} from \"./mapOpenSpec2\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {mapOpenSpec3} from \"./mapOpenSpec3\";\nimport {mergeSpec} from \"./mergeSpec\";\n\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec: any, {fileSpec, acceptMimes, specVersion, version}: any): Partial<OpenSpec2 | OpenSpec3> {\n specVersion = specVersion || getValue<OpenSpecVersions>(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n\n const options = {\n specVersion,\n acceptMimes\n };\n\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n\n spec = mergeSpec(spec, fileSpec);\n\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n\n return spec;\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { getValue, uniq } from "@tsed/core";
2
+ import { mapOpenSpecInfo } from "./mapOpenSpecInfo.js";
3
+ /**
4
+ * @ignore
5
+ * @param spec
6
+ * @param version
7
+ * @param specVersion
8
+ * @param acceptMimes
9
+ */
10
+ export function mapOpenSpec2(spec, { version, specVersion, acceptMimes = ["application/json"] }) {
11
+ const { paths, security, tags, host, basePath, schemes, consumes = [], produces = ["application/json"], definitions, parameters, responses, securityDefinitions, externalDocs } = spec;
12
+ return {
13
+ swagger: specVersion,
14
+ consumes: uniq([...acceptMimes, ...consumes]),
15
+ produces: uniq([...produces]),
16
+ info: mapOpenSpecInfo(getValue(spec, "info", {})),
17
+ paths,
18
+ host,
19
+ basePath,
20
+ schemes,
21
+ definitions,
22
+ parameters,
23
+ responses,
24
+ security,
25
+ securityDefinitions,
26
+ tags,
27
+ externalDocs
28
+ };
29
+ }
30
+ //# sourceMappingURL=mapOpenSpec2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapOpenSpec2.js","sourceRoot":"","sources":["../../../src/utils/mapOpenSpec2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAwB,EACxB,EAAC,OAAO,EAAE,WAAW,EAAE,WAAW,GAAG,CAAC,kBAAkB,CAAC,EAAM;IAE/D,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,CAAC,kBAAkB,CAAC,EAC/B,WAAW,EACX,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,YAAY,EACb,GAAG,IAAI,CAAC;IAET,OAAO;QACL,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,IAAI,CAAC,CAAC,GAAG,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAC;QAC7C,QAAQ,EAAE,IAAI,CAAS,CAAC,GAAG,QAAQ,CAAC,CAAC;QACrC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACjD,KAAK;QACL,IAAI;QACJ,QAAQ;QACR,OAAO;QACP,WAAW;QACX,UAAU;QACV,SAAS;QACT,QAAQ;QACR,mBAAmB;QACnB,IAAI;QACJ,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["import {getValue, uniq} from \"@tsed/core\";\nimport {OpenSpec2} from \"@tsed/openspec\";\nimport {mapOpenSpecInfo} from \"./mapOpenSpecInfo\";\n\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(\n spec: Partial<OpenSpec2>,\n {version, specVersion, acceptMimes = [\"application/json\"]}: any\n): Partial<OpenSpec2> {\n const {\n paths,\n security,\n tags,\n host,\n basePath,\n schemes,\n consumes = [],\n produces = [\"application/json\"],\n definitions,\n parameters,\n responses,\n securityDefinitions,\n externalDocs\n } = spec;\n\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq<string>([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { getValue } from "@tsed/core";
2
+ import { mapOpenSpecInfo } from "./mapOpenSpecInfo.js";
3
+ /**
4
+ * @ignore
5
+ * @param spec
6
+ * @param version
7
+ * @param specVersion
8
+ */
9
+ export function mapOpenSpec3(spec, { specVersion }) {
10
+ const { servers, paths, components, security, tags, externalDocs } = spec;
11
+ return {
12
+ openapi: specVersion,
13
+ info: mapOpenSpecInfo(getValue(spec, "info", {})),
14
+ servers,
15
+ paths,
16
+ components,
17
+ security,
18
+ tags,
19
+ externalDocs
20
+ };
21
+ }
22
+ //# sourceMappingURL=mapOpenSpec3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapOpenSpec3.js","sourceRoot":"","sources":["../../../src/utils/mapOpenSpec3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS,EAAE,EAAC,WAAW,EAAM;IACxD,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAC,GAAG,IAAI,CAAC;IAExE,OAAO;QACL,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO;QACP,KAAK;QACL,UAAU;QACV,QAAQ;QACR,IAAI;QACJ,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["import {getValue} from \"@tsed/core\";\nimport {OpenSpec3} from \"@tsed/openspec\";\nimport {mapOpenSpecInfo} from \"./mapOpenSpecInfo\";\n\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec: any, {specVersion}: any): Partial<OpenSpec3> {\n const {servers, paths, components, security, tags, externalDocs} = spec;\n\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { cleanObject } from "@tsed/core";
2
+ /**
3
+ * @ignore
4
+ * @param info
5
+ */
6
+ export function mapOpenSpecInfo(info) {
7
+ const { title, description, version, termsOfService, contact, license } = info;
8
+ return cleanObject({
9
+ version,
10
+ title,
11
+ description,
12
+ termsOfService,
13
+ contact,
14
+ license
15
+ });
16
+ }
17
+ //# sourceMappingURL=mapOpenSpecInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapOpenSpecInfo.js","sourceRoot":"","sources":["../../../src/utils/mapOpenSpecInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAGvC;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAA2B;IACzD,MAAM,EAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC;IAE7E,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,KAAK;QACL,WAAW;QACX,cAAc;QACd,OAAO;QACP,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {cleanObject} from \"@tsed/core\";\nimport {OpenSpecInfo} from \"@tsed/openspec\";\n\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info: Partial<OpenSpecInfo>): OpenSpecInfo {\n const {title, description, version, termsOfService, contact, license} = info;\n\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n"]}
@@ -7,6 +7,7 @@ import { getJsonPathParameters } from "./getJsonPathParameters.js";
7
7
  export function mergeOperation(obj, operation, { rootPath, specType, operationId, defaultTags, tags, path, method }) {
8
8
  const pathParameters = getJsonPathParameters(rootPath, path).map(({ path, parameters }) => {
9
9
  path = path ? path : "/";
10
+ // FIXME not on the right place
10
11
  if (specType === SpecTypes.OPENAPI) {
11
12
  parameters = parameters.map(({ type, ...param }) => {
12
13
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"mergeOperation.js","sourceRoot":"","sources":["../../../src/utils/mergeOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAe9D;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAQ,EACR,SAAc,EACd,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAwB;IAEzF,MAAM,cAAc,GAAG,qBAAqB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;QACtF,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,IAAI,QAAQ,KAAK,SAAS,CAAC,OAAO,EAAE;YAClC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,EAAE;gBAC/C,OAAO;oBACL,GAAG,KAAK;oBACR,MAAM,EAAE;wBACN,IAAI;qBACL;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;;QACvD,UAAU,GAAG,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACrD,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,MAAM,aAAa,GAAG,CAAA,MAAA,SAAS,CAAC,IAAI,0CAAE,MAAM,EAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAE9E,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;YAChB,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAClB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE;gBACtB,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;gBACvD,GAAG,SAAS;gBACZ,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAM,EAAE,EAAE,CAAC,IAAI,CAAC;gBAC9C,UAAU;aACX;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QAE5B,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,GAAG,CAAC,CAAC;AACV,CAAC","sourcesContent":["import {SpecTypes} from \"../domain/SpecTypes\";\nimport {concatParameters} from \"./concatParameters\";\nimport {getJsonPathParameters} from \"./getJsonPathParameters\";\n\n/**\n * @ignore\n */\nexport interface MergeOperationOptions {\n rootPath: string;\n specType: SpecTypes;\n operationId: (path: string) => string | undefined;\n defaultTags: string[];\n tags: string[];\n path: string;\n method: string;\n}\n\n/**\n * @ignore\n */\nexport function mergeOperation(\n obj: any,\n operation: any,\n {rootPath, specType, operationId, defaultTags, tags, path, method}: MergeOperationOptions\n) {\n const pathParameters = getJsonPathParameters(rootPath, path).map(({path, parameters}) => {\n path = path ? path : \"/\";\n\n if (specType === SpecTypes.OPENAPI) {\n parameters = parameters.map(({type, ...param}) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n });\n }\n\n return {path, parameters};\n });\n\n return pathParameters.reduce((obj, {path, parameters}) => {\n parameters = concatParameters(parameters, operation);\n path = path ? path : \"/\";\n\n const operationTags = operation.tags?.length ? operation.tags : [defaultTags];\n\n obj.paths[path] = {\n ...obj.paths[path],\n [method.toLowerCase()]: {\n operationId: operation.operationId || operationId(path),\n ...operation,\n tags: operationTags.map(({name}: any) => name),\n parameters\n }\n };\n\n tags.push(...operationTags);\n\n return obj;\n }, obj);\n}\n"]}
1
+ {"version":3,"file":"mergeOperation.js","sourceRoot":"","sources":["../../../src/utils/mergeOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAe9D;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAQ,EACR,SAAc,EACd,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAwB;IAEzF,MAAM,cAAc,GAAG,qBAAqB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;QACtF,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,+BAA+B;QAC/B,IAAI,QAAQ,KAAK,SAAS,CAAC,OAAO,EAAE;YAClC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,EAAE;gBAC/C,OAAO;oBACL,GAAG,KAAK;oBACR,MAAM,EAAE;wBACN,IAAI;qBACL;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;;QACvD,UAAU,GAAG,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACrD,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,MAAM,aAAa,GAAG,CAAA,MAAA,SAAS,CAAC,IAAI,0CAAE,MAAM,EAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAE9E,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;YAChB,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAClB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE;gBACtB,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;gBACvD,GAAG,SAAS;gBACZ,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAM,EAAE,EAAE,CAAC,IAAI,CAAC;gBAC9C,UAAU;aACX;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QAE5B,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,GAAG,CAAC,CAAC;AACV,CAAC","sourcesContent":["import {SpecTypes} from \"../domain/SpecTypes\";\nimport {concatParameters} from \"./concatParameters\";\nimport {getJsonPathParameters} from \"./getJsonPathParameters\";\n\n/**\n * @ignore\n */\nexport interface MergeOperationOptions {\n rootPath: string;\n specType: SpecTypes;\n operationId: (path: string) => string | undefined;\n defaultTags: string[];\n tags: string[];\n path: string;\n method: string;\n}\n\n/**\n * @ignore\n */\nexport function mergeOperation(\n obj: any,\n operation: any,\n {rootPath, specType, operationId, defaultTags, tags, path, method}: MergeOperationOptions\n) {\n const pathParameters = getJsonPathParameters(rootPath, path).map(({path, parameters}) => {\n path = path ? path : \"/\";\n\n // FIXME not on the right place\n if (specType === SpecTypes.OPENAPI) {\n parameters = parameters.map(({type, ...param}) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n });\n }\n\n return {path, parameters};\n });\n\n return pathParameters.reduce((obj, {path, parameters}) => {\n parameters = concatParameters(parameters, operation);\n path = path ? path : \"/\";\n\n const operationTags = operation.tags?.length ? operation.tags : [defaultTags];\n\n obj.paths[path] = {\n ...obj.paths[path],\n [method.toLowerCase()]: {\n operationId: operation.operationId || operationId(path),\n ...operation,\n tags: operationTags.map(({name}: any) => name),\n parameters\n }\n };\n\n tags.push(...operationTags);\n\n return obj;\n }, obj);\n}\n"]}
@@ -1,8 +1,5 @@
1
1
  export declare enum SpecTypes {
2
2
  JSON = "jsonschema",
3
- /**
4
- * @deprecated
5
- */
6
3
  SWAGGER = "swagger2",
7
4
  OPENAPI = "openapi3"
8
5
  }
@@ -116,6 +116,7 @@ export * from "./utils/concatParameters";
116
116
  export * from "./utils/concatPath";
117
117
  export * from "./utils/defineStatusModel";
118
118
  export * from "./utils/from";
119
+ export * from "./utils/generateSpec";
119
120
  export * from "./utils/generics";
120
121
  export * from "./utils/getComputedType";
121
122
  export * from "./utils/getInheritedStores";
@@ -128,9 +129,14 @@ export * from "./utils/getOperationsStores";
128
129
  export * from "./utils/getPropertiesStores";
129
130
  export * from "./utils/getRequiredProperties";
130
131
  export * from "./utils/getSpec";
132
+ export * from "./utils/getSpecType";
131
133
  export * from "./utils/isSuccessStatus";
132
134
  export * from "./utils/mapHeaders";
133
135
  export * from "./utils/mapNullableType";
136
+ export * from "./utils/mapOpenSpec";
137
+ export * from "./utils/mapOpenSpec2";
138
+ export * from "./utils/mapOpenSpec3";
139
+ export * from "./utils/mapOpenSpecInfo";
134
140
  export * from "./utils/mapRouteOptions";
135
141
  export * from "./utils/matchGroups";
136
142
  export * from "./utils/mergeOperation";
@@ -0,0 +1,16 @@
1
+ import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
2
+ import { JsonTokenOptions, SpecSerializerOptions } from "./getSpec";
3
+ export interface GenerateSpecOptions extends Omit<SpecSerializerOptions, "specType"> {
4
+ tokens: JsonTokenOptions;
5
+ version?: string;
6
+ acceptMimes?: string;
7
+ specPath?: string;
8
+ specVersion?: string;
9
+ spec?: any;
10
+ }
11
+ /**
12
+ * Generate OpenAPI spec from multiple sources (models, files, conf)
13
+ * @param tokens
14
+ * @param options
15
+ */
16
+ export declare function generateSpec({ tokens, ...options }: GenerateSpecOptions): Promise<OpenSpec2 | OpenSpec3>;
@@ -1,9 +1,10 @@
1
1
  import { Type } from "@tsed/core";
2
- import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
3
- import { SpecTypes } from "../domain/SpecTypes";
2
+ import { OpenSpec3 } from "@tsed/openspec";
4
3
  import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
4
+ export declare type JsonTokenOptions = ({
5
+ token: Type<any>;
6
+ } & Partial<SpecSerializerOptions>)[];
5
7
  export interface SpecSerializerOptions extends JsonSchemaOptions {
6
- specType?: SpecTypes.SWAGGER | SpecTypes.OPENAPI;
7
8
  /**
8
9
  * Paths
9
10
  */
@@ -21,29 +22,9 @@ export interface SpecSerializerOptions extends JsonSchemaOptions {
21
22
  */
22
23
  operationIdPattern?: string;
23
24
  }
24
- export interface OS3SpecSerializerOptions extends SpecSerializerOptions {
25
- /**
26
- * Define Spec types level
27
- */
28
- specType: SpecTypes.OPENAPI;
29
- }
30
- export interface OS2SpecSerializerOptions extends SpecSerializerOptions {
31
- /**
32
- * Define Spec types level
33
- */
34
- specType: SpecTypes.SWAGGER;
35
- }
36
- /**
37
- * Return the swagger or open spec for the given class.
38
- * @param model
39
- * @param options
40
- */
41
- export declare function getSpec(model: Type<any>, options: OS2SpecSerializerOptions): Partial<OpenSpec2>;
42
- export declare function getSpec(model: Type<any>): Partial<OpenSpec2>;
43
- export declare function getSpec(model: Type<any>, options: SpecSerializerOptions): Partial<OpenSpec2>;
44
25
  /**
45
26
  * Return the swagger or open spec for the given class.
46
27
  * @param model
47
28
  * @param options
48
29
  */
49
- export declare function getSpec(model: Type<any>, options: OS3SpecSerializerOptions): Partial<OpenSpec3>;
30
+ export declare function getSpec(model: Type<any> | JsonTokenOptions, options?: SpecSerializerOptions): Partial<OpenSpec3>;
@@ -0,0 +1,12 @@
1
+ import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
2
+ import { SpecTypes } from "../domain/SpecTypes";
3
+ /**
4
+ * @ignore
5
+ * @param version
6
+ */
7
+ export declare function getSpecType(version: string): SpecTypes.SWAGGER | SpecTypes.OPENAPI;
8
+ /**
9
+ * @ignore
10
+ * @param spec
11
+ */
12
+ export declare function getSpecTypeFromSpec(spec: Partial<OpenSpec2 | OpenSpec3>): SpecTypes.SWAGGER | SpecTypes.OPENAPI;
@@ -0,0 +1,10 @@
1
+ import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
2
+ /**
3
+ * @ignore
4
+ * @param spec
5
+ * @param fileSpec
6
+ * @param version
7
+ * @param acceptMimes
8
+ * @param specVersion
9
+ */
10
+ export declare function mapOpenSpec(spec: any, { fileSpec, acceptMimes, specVersion, version }: any): Partial<OpenSpec2 | OpenSpec3>;
@@ -0,0 +1,9 @@
1
+ import { OpenSpec2 } from "@tsed/openspec";
2
+ /**
3
+ * @ignore
4
+ * @param spec
5
+ * @param version
6
+ * @param specVersion
7
+ * @param acceptMimes
8
+ */
9
+ export declare function mapOpenSpec2(spec: Partial<OpenSpec2>, { version, specVersion, acceptMimes }: any): Partial<OpenSpec2>;
@@ -0,0 +1,8 @@
1
+ import { OpenSpec3 } from "@tsed/openspec";
2
+ /**
3
+ * @ignore
4
+ * @param spec
5
+ * @param version
6
+ * @param specVersion
7
+ */
8
+ export declare function mapOpenSpec3(spec: any, { specVersion }: any): Partial<OpenSpec3>;
@@ -0,0 +1,6 @@
1
+ import { OpenSpecInfo } from "@tsed/openspec";
2
+ /**
3
+ * @ignore
4
+ * @param info
5
+ */
6
+ export declare function mapOpenSpecInfo(info: Partial<OpenSpecInfo>): OpenSpecInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/schema",
3
- "version": "6.105.2",
3
+ "version": "6.106.0",
4
4
  "description": "JsonSchema module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -32,8 +32,10 @@
32
32
  "tsed"
33
33
  ],
34
34
  "dependencies": {
35
- "@tsed/openspec": "6.105.2",
35
+ "@tsed/openspec": "6.106.0",
36
+ "api-spec-converter": "2.12.0",
36
37
  "camel-case": "4.1.2",
38
+ "fs-extra": "^10.0.1",
37
39
  "json-schema": "0.4.0",
38
40
  "micromatch": "4.0.4",
39
41
  "pascal-case": "3.1.2",
@@ -42,19 +44,18 @@
42
44
  },
43
45
  "devDependencies": {
44
46
  "@apidevtools/swagger-parser": "10.0.2",
45
- "@tsed/core": "6.105.2",
46
- "@tsed/openspec": "6.105.2",
47
+ "@tsed/core": "6.106.0",
48
+ "@tsed/openspec": "6.106.0",
47
49
  "@types/fs-extra": "9.0.6",
48
50
  "@types/json-schema": "7.0.7",
49
51
  "@types/micromatch": "4.0.1",
50
- "@types/statuses": "2.0.0",
51
- "fs-extra": "9.0.1"
52
+ "@types/statuses": "2.0.0"
52
53
  },
53
54
  "peerDependencies": {
54
- "@tsed/core": "^6.105.2"
55
+ "@tsed/core": "^6.106.0"
55
56
  },
56
57
  "peerDependenciesMeta": {
57
- "@tsed/code": {
58
+ "@tsed/core": {
58
59
  "optional": false
59
60
  }
60
61
  },