Skip to content

Commit 192462f

Browse files
committed
fix: Fix data type labels for oneOf and anyOf, remove duplicate union check
1 parent 227e582 commit 192462f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/PropertyDocumentMixin.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ const mxFunction = (base) => {
121121
if (this._hasType(range, rs.ScalarShape)) {
122122
return this._computeScalarDataType(range);
123123
}
124+
if (this._hasProperty(range, this.ns.w3.shacl.xone)) {
125+
return 'One of';
126+
}
127+
if (this._hasProperty(range, this.ns.w3.shacl.or)) {
128+
return 'Any of';
129+
}
124130
if (this._hasType(range, rs.UnionShape)) {
125131
return 'Union';
126132
}
@@ -145,9 +151,6 @@ const mxFunction = (base) => {
145151
if (this._hasType(range, rs.TupleShape)) {
146152
return 'Tuple';
147153
}
148-
if (this._hasType(range, rs.UnionShape)) {
149-
return 'Union';
150-
}
151154
if (this._hasType(range, rs.RecursiveShape)) {
152155
return 'Recursive';
153156
}

0 commit comments

Comments
 (0)