Skip to content

Commit

Permalink
Merge pull request #150 from rabix/release/1.23.2
Browse files Browse the repository at this point in the history
Release/1.23.2
  • Loading branch information
milosdanilov authored Nov 16, 2021
2 parents 7030605 + a541ec7 commit 2ac1345
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cwlts",
"version": "1.23.1",
"version": "1.23.2",
"description": "TypeScript data model for Common Workflow Language",
"scripts": {
"tsc": "npx tsc",
Expand Down
10 changes: 0 additions & 10 deletions src/models/generic/ParameterTypeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@ export class ParameterTypeModel extends ValidationBase implements Serializable<a
}
}

if (this.unionType) {
this.setIssue({
[this.loc]: {
type: "info",
message: `Union type is not supported yet: ${this.unionType}`,
code: ErrorCode.TYPE_UNSUPPORTED
}
});
}

return Promise.all(promises).then(res => {
return this.issues;
});
Expand Down
5 changes: 2 additions & 3 deletions src/models/helpers/TypeResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class TypeResolver {
}

if (type.length !== 1) {
result.type = "array";
// check if type has only two remaining values
if (type.length === 2) {
// resolve types to TypeResolution
Expand All @@ -123,12 +122,12 @@ export class TypeResolver {
result.isItemOrArray = true;
} else {
result.unionType = type;
console.warn(`TypeResolverWarning: Union types only partially supported. Found type ${JSON.stringify(type)}`);
return result;
}

} else {
result.unionType = type;
console.warn(`TypeResolverWarning: Union types only partially supported! Found type ${JSON.stringify(type)}`);
return result;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/models/v1.0/V1WorkflowInputParameterModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class V1WorkflowInputParameterModel extends WorkflowInputParameterModel {
}
}

if (this.type.type) base.type = this.type.serialize("v1.0");
if (this.type.type || this.type.unionType) base.type = this.type.serialize("v1.0");

if (this._label) base.label = this._label;
if (this.description) base.doc = this.description;
Expand Down

0 comments on commit 2ac1345

Please sign in to comment.