ng-openapi 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +3 -3
- package/index.js +2 -2
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -44,7 +44,7 @@ var fs4 = __toESM(require("fs"));
|
|
|
44
44
|
var path12 = __toESM(require("path"));
|
|
45
45
|
|
|
46
46
|
// package.json
|
|
47
|
-
var version = "0.2.
|
|
47
|
+
var version = "0.2.5";
|
|
48
48
|
|
|
49
49
|
// src/lib/core/generator.ts
|
|
50
50
|
var import_ts_morph7 = require("ts-morph");
|
|
@@ -82,7 +82,7 @@ function getTypeScriptType(schemaOrType, config, formatOrNullable, isNullable, c
|
|
|
82
82
|
}
|
|
83
83
|
if (schema.type === "array") {
|
|
84
84
|
const itemType = schema.items ? getTypeScriptType(schema.items, config, void 0, void 0, context) : "unknown";
|
|
85
|
-
return nullable ? `(
|
|
85
|
+
return nullable ? `(Array<${itemType}> | null)` : `Array<${itemType}>`;
|
|
86
86
|
}
|
|
87
87
|
switch (schema.type) {
|
|
88
88
|
case "string":
|
|
@@ -815,7 +815,7 @@ var TypeGenerator = class {
|
|
|
815
815
|
}
|
|
816
816
|
if (schema.type === "array") {
|
|
817
817
|
const itemType = schema.items ? this.getArrayItemType(schema.items) : "unknown";
|
|
818
|
-
return
|
|
818
|
+
return `Array<${itemType}>`;
|
|
819
819
|
}
|
|
820
820
|
if (schema.type === "object") {
|
|
821
821
|
if (schema.properties) {
|
package/index.js
CHANGED
|
@@ -152,7 +152,7 @@ function getTypeScriptType(schemaOrType, config, formatOrNullable, isNullable, c
|
|
|
152
152
|
}
|
|
153
153
|
if (schema.type === "array") {
|
|
154
154
|
const itemType = schema.items ? getTypeScriptType(schema.items, config, void 0, void 0, context) : "unknown";
|
|
155
|
-
return nullable ? `(
|
|
155
|
+
return nullable ? `(Array<${itemType}> | null)` : `Array<${itemType}>`;
|
|
156
156
|
}
|
|
157
157
|
switch (schema.type) {
|
|
158
158
|
case "string":
|
|
@@ -936,7 +936,7 @@ var _TypeGenerator = class _TypeGenerator {
|
|
|
936
936
|
}
|
|
937
937
|
if (schema.type === "array") {
|
|
938
938
|
const itemType = schema.items ? this.getArrayItemType(schema.items) : "unknown";
|
|
939
|
-
return
|
|
939
|
+
return `Array<${itemType}>`;
|
|
940
940
|
}
|
|
941
941
|
if (schema.type === "object") {
|
|
942
942
|
if (schema.properties) {
|