ts-openapi-codegen 2.0.0-beta.12 → 2.0.0-beta.13

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 (42) hide show
  1. package/dist/cli/index.js +1 -2
  2. package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
  3. package/dist/cli/previewChanges/previewChanges.js +112 -32
  4. package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts.map +1 -1
  5. package/dist/cli/previewChanges/utils/updateOutputPaths.js +6 -0
  6. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -1
  7. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +13 -0
  8. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts +2 -0
  9. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts.map +1 -0
  10. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.js +185 -0
  11. package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +20 -3
  12. package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +1 -1
  13. package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +1 -1
  14. package/dist/core/types/base/Templates.model.d.ts +1 -1
  15. package/dist/core/types/base/Templates.model.d.ts.map +1 -1
  16. package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
  17. package/dist/core/utils/registerHandlebarTemplates.js +42 -41
  18. package/dist/templatesCompiled/client/exportClient.js +1 -1
  19. package/dist/templatesCompiled/client/exportSchema.d.ts +5 -1
  20. package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -1
  21. package/dist/templatesCompiled/client/exportSchema.js +37 -7
  22. package/dist/templatesCompiled/client/joi/exportSchema.js +3 -3
  23. package/dist/templatesCompiled/client/joi/partials/joiSchema.js +7 -7
  24. package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +4 -4
  25. package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +3 -3
  26. package/dist/templatesCompiled/client/jsonschema/exportSchema.js +3 -3
  27. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +7 -7
  28. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +5 -5
  29. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +2 -2
  30. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +5 -5
  31. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +2 -2
  32. package/dist/templatesCompiled/client/yup/exportSchema.js +1 -1
  33. package/dist/templatesCompiled/client/yup/partials/yupSchema.js +7 -7
  34. package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +4 -4
  35. package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +3 -3
  36. package/dist/templatesCompiled/client/zod/exportSchema.js +1 -1
  37. package/dist/templatesCompiled/client/zod/partials/zodSchema.js +7 -7
  38. package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +8 -8
  39. package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +9 -9
  40. package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +4 -4
  41. package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +3 -3
  42. package/package.json +2 -2
@@ -32,8 +32,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
32
32
  return " "
33
33
  + ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 15 } }), depth0)) != null ? stack1 : "")
34
34
  + ": "
35
- + ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchema"), depth0, { "name": "jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
36
- + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 41 }, "end": { "line": 6, "column": 70 } } })) != null ? stack1 : "")
35
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchema"), depth0, { "name": "jsonschema/jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
36
+ + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 52 }, "end": { "line": 6, "column": 81 } } })) != null ? stack1 : "")
37
37
  + "\n";
38
38
  }, "3": function (container, depth0, helpers, partials, data) {
39
39
  return ",";
@@ -46,7 +46,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
46
46
  + "\nimport * as yup from 'yup';\n\nexport const "
47
47
  + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } }), depth0)) != null ? stack1 : "")
48
48
  + "Schema = "
49
- + ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
49
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchema"), depth0, { "name": "yup/yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
50
50
  + ";\n\nexport type "
51
51
  + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } }), depth0)) != null ? stack1 : "")
52
52
  + " = yup.InferType<typeof "
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
13
13
  }
14
14
  return undefined;
15
15
  };
16
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaInterface"), depth0, { "name": "yupSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
16
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaInterface"), depth0, { "name": "yup/yupSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
17
17
  }, "3": function (container, depth0, helpers, partials, data) {
18
18
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
19
19
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
29
29
  }
30
30
  return undefined;
31
31
  };
32
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaEnum"), depth0, { "name": "yupSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
32
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaEnum"), depth0, { "name": "yup/yupSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
33
33
  }, "6": function (container, depth0, helpers, partials, data) {
34
34
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
35
35
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -45,7 +45,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
45
45
  }
46
46
  return undefined;
47
47
  };
48
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaArray"), depth0, { "name": "yupSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
48
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaArray"), depth0, { "name": "yup/yupSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
49
49
  }, "9": function (container, depth0, helpers, partials, data) {
50
50
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
51
51
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -61,7 +61,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
61
61
  }
62
62
  return undefined;
63
63
  };
64
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaDictionary"), depth0, { "name": "yupSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
64
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaDictionary"), depth0, { "name": "yup/yupSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
65
65
  }, "12": function (container, depth0, helpers, partials, data) {
66
66
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
67
67
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -77,7 +77,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
77
77
  }
78
78
  return undefined;
79
79
  };
80
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaComposition"), depth0, { "name": "yupSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
80
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaComposition"), depth0, { "name": "yup/yupSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
81
81
  }, "15": function (container, depth0, helpers, partials, data) {
82
82
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
83
83
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -109,7 +109,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
109
109
  }
110
110
  return undefined;
111
111
  };
112
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaReference"), depth0, { "name": "yupSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
112
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaReference"), depth0, { "name": "yup/yupSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
113
113
  }, "20": function (container, depth0, helpers, partials, data) {
114
114
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
115
115
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -117,7 +117,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
117
117
  }
118
118
  return undefined;
119
119
  };
120
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchemaGeneric"), depth0, { "name": "yupSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
120
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchemaGeneric"), depth0, { "name": "yup/yupSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
121
121
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
122
122
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
123
123
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -26,8 +26,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
26
26
  return undefined;
27
27
  };
28
28
  return " "
29
- + ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
30
- + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 47 } } })) != null ? stack1 : "")
29
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchema"), depth0, { "name": "yup/yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
30
+ + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 51 } } })) != null ? stack1 : "")
31
31
  + "\n";
32
32
  }, "3": function (container, depth0, helpers, partials, data) {
33
33
  return ",";
@@ -74,7 +74,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
74
74
  }
75
75
  return undefined;
76
76
  };
77
- return ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
77
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchema"), depth0, { "name": "yup/yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
78
78
  }, "13": function (container, depth0, helpers, partials, data) {
79
79
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
80
80
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -83,7 +83,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
83
83
  return undefined;
84
84
  };
85
85
  return ".concat("
86
- + ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
86
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchema"), depth0, { "name": "yup/yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
87
87
  + ")\n";
88
88
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
89
89
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -28,9 +28,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
28
28
  return " "
29
29
  + ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }), depth0)) != null ? stack1 : "")
30
30
  + ": "
31
- + ((stack1 = container.invokePartial(lookupProperty(partials, "yupSchema"), depth0, { "name": "yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
32
- + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 30 }, "end": { "line": 4, "column": 74 } } })) != null ? stack1 : "")
33
- + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 74 }, "end": { "line": 4, "column": 103 } } })) != null ? stack1 : "")
31
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "yup/yupSchema"), depth0, { "name": "yup/yupSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
32
+ + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 78 } } })) != null ? stack1 : "")
33
+ + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 78 }, "end": { "line": 4, "column": 107 } } })) != null ? stack1 : "")
34
34
  + "\n";
35
35
  }, "3": function (container, depth0, helpers, partials, data) {
36
36
  return ".optional()";
@@ -46,7 +46,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
46
46
  + "\nimport { z } from 'zod';\n\nexport const "
47
47
  + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } }), depth0)) != null ? stack1 : "")
48
48
  + "Schema = "
49
- + ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
49
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
50
50
  + ";\n\nexport type "
51
51
  + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } }), depth0)) != null ? stack1 : "")
52
52
  + " = z.infer<typeof "
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
13
13
  }
14
14
  return undefined;
15
15
  };
16
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaInterface"), depth0, { "name": "zodSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
16
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaInterface"), depth0, { "name": "zod/zodSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
17
17
  }, "3": function (container, depth0, helpers, partials, data) {
18
18
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
19
19
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
29
29
  }
30
30
  return undefined;
31
31
  };
32
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaEnum"), depth0, { "name": "zodSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
32
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaEnum"), depth0, { "name": "zod/zodSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
33
33
  }, "6": function (container, depth0, helpers, partials, data) {
34
34
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
35
35
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -45,7 +45,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
45
45
  }
46
46
  return undefined;
47
47
  };
48
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaArray"), depth0, { "name": "zodSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
48
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaArray"), depth0, { "name": "zod/zodSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
49
49
  }, "9": function (container, depth0, helpers, partials, data) {
50
50
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
51
51
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -61,7 +61,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
61
61
  }
62
62
  return undefined;
63
63
  };
64
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaDictionary"), depth0, { "name": "zodSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
64
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaDictionary"), depth0, { "name": "zod/zodSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
65
65
  }, "12": function (container, depth0, helpers, partials, data) {
66
66
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
67
67
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -77,7 +77,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
77
77
  }
78
78
  return undefined;
79
79
  };
80
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaComposition"), depth0, { "name": "zodSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
80
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaComposition"), depth0, { "name": "zod/zodSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
81
81
  }, "15": function (container, depth0, helpers, partials, data) {
82
82
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
83
83
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -109,7 +109,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
109
109
  }
110
110
  return undefined;
111
111
  };
112
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaReference"), depth0, { "name": "zodSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
112
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaReference"), depth0, { "name": "zod/zodSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
113
113
  }, "20": function (container, depth0, helpers, partials, data) {
114
114
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
115
115
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -117,7 +117,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
117
117
  }
118
118
  return undefined;
119
119
  };
120
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchemaGeneric"), depth0, { "name": "zodSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
120
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchemaGeneric"), depth0, { "name": "zod/zodSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
121
121
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
122
122
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
123
123
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
13
13
  }
14
14
  return undefined;
15
15
  };
16
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), lookupProperty(depth0, "link"), { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
16
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), lookupProperty(depth0, "link"), { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
17
17
  }, "3": function (container, depth0, helpers, partials, data) {
18
18
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
19
19
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -21,16 +21,16 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
21
21
  }
22
22
  return undefined;
23
23
  };
24
- return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 69 } } })) != null ? stack1 : "");
24
+ return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 73 } } })) != null ? stack1 : "");
25
25
  }, "5": function (container, depth0, helpers, partials, data) {
26
26
  var stack1;
27
27
  return ".min("
28
- + ((stack1 = container.lambda(container.strict(depth0, "minItems", { "start": { "line": 1, "column": 101 }, "end": { "line": 1, "column": 109 } }), depth0)) != null ? stack1 : "")
28
+ + ((stack1 = container.lambda(container.strict(depth0, "minItems", { "start": { "line": 1, "column": 105 }, "end": { "line": 1, "column": 113 } }), depth0)) != null ? stack1 : "")
29
29
  + ")";
30
30
  }, "7": function (container, depth0, helpers, partials, data) {
31
31
  var stack1;
32
32
  return ".max("
33
- + ((stack1 = container.lambda(container.strict(depth0, "maxItems", { "start": { "line": 1, "column": 144 }, "end": { "line": 1, "column": 152 } }), depth0)) != null ? stack1 : "")
33
+ + ((stack1 = container.lambda(container.strict(depth0, "maxItems", { "start": { "line": 1, "column": 148 }, "end": { "line": 1, "column": 156 } }), depth0)) != null ? stack1 : "")
34
34
  + ")";
35
35
  }, "9": function (container, depth0, helpers, partials, data) {
36
36
  return ".nullable()";
@@ -42,10 +42,10 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
42
42
  return undefined;
43
43
  };
44
44
  return "z.array("
45
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 76 } } })) != null ? stack1 : "")
45
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 80 } } })) != null ? stack1 : "")
46
46
  + ")"
47
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minItems"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 77 }, "end": { "line": 1, "column": 120 } } })) != null ? stack1 : "")
48
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxItems"), { "name": "if", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 120 }, "end": { "line": 1, "column": 163 } } })) != null ? stack1 : "")
49
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 163 }, "end": { "line": 1, "column": 199 } } })) != null ? stack1 : "")
47
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minItems"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 81 }, "end": { "line": 1, "column": 124 } } })) != null ? stack1 : "")
48
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxItems"), { "name": "if", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 124 }, "end": { "line": 1, "column": 167 } } })) != null ? stack1 : "")
49
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 167 }, "end": { "line": 1, "column": 203 } } })) != null ? stack1 : "")
50
50
  + "\n";
51
51
  }, "usePartial": true, "useData": true };
@@ -14,9 +14,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
14
14
  return undefined;
15
15
  };
16
16
  return "z.union(["
17
- + ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 82 } } })) != null ? stack1 : "")
17
+ + ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 86 } } })) != null ? stack1 : "")
18
18
  + "])"
19
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 84 }, "end": { "line": 2, "column": 120 } } })) != null ? stack1 : "")
19
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 88 }, "end": { "line": 2, "column": 124 } } })) != null ? stack1 : "")
20
20
  + "\n";
21
21
  }, "2": function (container, depth0, helpers, partials, data) {
22
22
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -25,8 +25,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
25
25
  }
26
26
  return undefined;
27
27
  };
28
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
29
- + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 43 }, "end": { "line": 2, "column": 73 } } })) != null ? stack1 : "");
28
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
29
+ + ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 47 }, "end": { "line": 2, "column": 77 } } })) != null ? stack1 : "");
30
30
  }, "3": function (container, depth0, helpers, partials, data) {
31
31
  return ", ";
32
32
  }, "5": function (container, depth0, helpers, partials, data) {
@@ -54,8 +54,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
54
54
  }
55
55
  return undefined;
56
56
  };
57
- return ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 92 } } })) != null ? stack1 : "")
58
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 92 }, "end": { "line": 6, "column": 128 } } })) != null ? stack1 : "")
57
+ return ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "properties"), { "name": "each", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 100 } } })) != null ? stack1 : "")
58
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 100 }, "end": { "line": 6, "column": 136 } } })) != null ? stack1 : "")
59
59
  + "\n";
60
60
  }, "10": function (container, depth0, helpers, partials, data) {
61
61
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -64,7 +64,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
64
64
  }
65
65
  return undefined;
66
66
  };
67
- return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "first"), { "name": "if", "hash": {}, "fn": container.program(11, data, 0), "inverse": container.program(13, data, 0), "data": data, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 83 } } })) != null ? stack1 : "");
67
+ return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "first"), { "name": "if", "hash": {}, "fn": container.program(11, data, 0), "inverse": container.program(13, data, 0), "data": data, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 91 } } })) != null ? stack1 : "");
68
68
  }, "11": function (container, depth0, helpers, partials, data) {
69
69
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
70
70
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -72,7 +72,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
72
72
  }
73
73
  return undefined;
74
74
  };
75
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
75
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
76
76
  }, "13": function (container, depth0, helpers, partials, data) {
77
77
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
78
78
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -81,7 +81,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
81
81
  return undefined;
82
82
  };
83
83
  return ".and("
84
- + ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
84
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
85
85
  + ")";
86
86
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
87
87
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
13
13
  }
14
14
  return undefined;
15
15
  };
16
- return ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), lookupProperty(depth0, "link"), { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
16
+ return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), lookupProperty(depth0, "link"), { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
17
17
  }, "3": function (container, depth0, helpers, partials, data) {
18
18
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
19
19
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -21,7 +21,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
21
21
  }
22
22
  return undefined;
23
23
  };
24
- return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 82 } } })) != null ? stack1 : "");
24
+ return ((stack1 = lookupProperty(helpers, "zodBaseSchema").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), { "name": "zodBaseSchema", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 64 }, "end": { "line": 1, "column": 86 } } })) != null ? stack1 : "");
25
25
  }, "5": function (container, depth0, helpers, partials, data) {
26
26
  return ".nullable()";
27
27
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
@@ -32,8 +32,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
32
32
  return undefined;
33
33
  };
34
34
  return "z.record(z.string(), "
35
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 89 } } })) != null ? stack1 : "")
35
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(3, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 93 } } })) != null ? stack1 : "")
36
36
  + ")"
37
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 90 }, "end": { "line": 1, "column": 126 } } })) != null ? stack1 : "")
37
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 94 }, "end": { "line": 1, "column": 130 } } })) != null ? stack1 : "")
38
38
  + "\n";
39
39
  }, "usePartial": true, "useData": true };
@@ -24,9 +24,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
24
24
  return " "
25
25
  + ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }), depth0)) != null ? stack1 : "")
26
26
  + ": "
27
- + ((stack1 = container.invokePartial(lookupProperty(partials, "zodSchema"), depth0, { "name": "zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
28
- + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 30 }, "end": { "line": 4, "column": 74 } } })) != null ? stack1 : "")
29
- + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 74 }, "end": { "line": 4, "column": 103 } } })) != null ? stack1 : "")
27
+ + ((stack1 = container.invokePartial(lookupProperty(partials, "zod/zodSchema"), depth0, { "name": "zod/zodSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
28
+ + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 78 } } })) != null ? stack1 : "")
29
+ + ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 78 }, "end": { "line": 4, "column": 107 } } })) != null ? stack1 : "")
30
30
  + "\n";
31
31
  }, "3": function (container, depth0, helpers, partials, data) {
32
32
  return ".optional()";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-openapi-codegen",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
5
5
  "author": "Alexey Zverev",
6
6
  "homepage": "https://github.com/ozonophore/openapi-codegen.git",
@@ -67,7 +67,7 @@
67
67
  "boxen": "^5.1.2",
68
68
  "camelcase": "6.2.0",
69
69
  "chalk": "^4.1.2",
70
- "commander": "8.0.0",
70
+ "commander": "9.0.0",
71
71
  "configstore": "^5.0.1",
72
72
  "diff": "^8.0.2",
73
73
  "enquirer": "^2.4.1",