ng-openapi 0.2.1 → 0.2.2
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 +2 -2
- package/index.js +1 -1
- 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.1";
|
|
48
48
|
|
|
49
49
|
// src/lib/core/generator.ts
|
|
50
50
|
var import_ts_morph7 = require("ts-morph");
|
|
@@ -792,7 +792,7 @@ var TypeGenerator = class {
|
|
|
792
792
|
return schema.allOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" & ") || "Record<string, unknown>";
|
|
793
793
|
}
|
|
794
794
|
if (schema.oneOf) {
|
|
795
|
-
return schema.oneOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" | ") || "unknown";
|
|
795
|
+
return schema.oneOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type, index, array) => type !== "any" && type !== "unknown" && array.indexOf(type) === index).join(" | ") || "unknown";
|
|
796
796
|
}
|
|
797
797
|
if (schema.anyOf) {
|
|
798
798
|
return schema.anyOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" | ") || "unknown";
|
package/index.js
CHANGED
|
@@ -911,7 +911,7 @@ var _TypeGenerator = class _TypeGenerator {
|
|
|
911
911
|
return schema.allOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" & ") || "Record<string, unknown>";
|
|
912
912
|
}
|
|
913
913
|
if (schema.oneOf) {
|
|
914
|
-
return schema.oneOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" | ") || "unknown";
|
|
914
|
+
return schema.oneOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type, index, array) => type !== "any" && type !== "unknown" && array.indexOf(type) === index).join(" | ") || "unknown";
|
|
915
915
|
}
|
|
916
916
|
if (schema.anyOf) {
|
|
917
917
|
return schema.anyOf.map((def) => this.resolveSwaggerTypeCached(def)).filter((type) => type !== "any" && type !== "unknown").join(" | ") || "unknown";
|