Skip to content

Commit 2ac1345

Browse files
authored
Merge pull request #150 from rabix/release/1.23.2
Release/1.23.2
2 parents 7030605 + a541ec7 commit 2ac1345

File tree

5 files changed

+5
-16
lines changed

5 files changed

+5
-16
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cwlts",
3-
"version": "1.23.1",
3+
"version": "1.23.2",
44
"description": "TypeScript data model for Common Workflow Language",
55
"scripts": {
66
"tsc": "npx tsc",

src/models/generic/ParameterTypeModel.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,6 @@ export class ParameterTypeModel extends ValidationBase implements Serializable<a
265265
}
266266
}
267267

268-
if (this.unionType) {
269-
this.setIssue({
270-
[this.loc]: {
271-
type: "info",
272-
message: `Union type is not supported yet: ${this.unionType}`,
273-
code: ErrorCode.TYPE_UNSUPPORTED
274-
}
275-
});
276-
}
277-
278268
return Promise.all(promises).then(res => {
279269
return this.issues;
280270
});

src/models/helpers/TypeResolver.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export class TypeResolver {
109109
}
110110

111111
if (type.length !== 1) {
112-
result.type = "array";
113112
// check if type has only two remaining values
114113
if (type.length === 2) {
115114
// resolve types to TypeResolution
@@ -123,12 +122,12 @@ export class TypeResolver {
123122
result.isItemOrArray = true;
124123
} else {
125124
result.unionType = type;
126-
console.warn(`TypeResolverWarning: Union types only partially supported. Found type ${JSON.stringify(type)}`);
125+
return result;
127126
}
128127

129128
} else {
130129
result.unionType = type;
131-
console.warn(`TypeResolverWarning: Union types only partially supported! Found type ${JSON.stringify(type)}`);
130+
return result;
132131
}
133132
}
134133

src/models/v1.0/V1WorkflowInputParameterModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class V1WorkflowInputParameterModel extends WorkflowInputParameterModel {
8989
}
9090
}
9191

92-
if (this.type.type) base.type = this.type.serialize("v1.0");
92+
if (this.type.type || this.type.unionType) base.type = this.type.serialize("v1.0");
9393

9494
if (this._label) base.label = this._label;
9595
if (this.description) base.doc = this.description;

0 commit comments

Comments
 (0)