Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sergey Kozlovskiy
Schema
Commits
a800891b
Commit
a800891b
authored
4 years ago
by
Ruben Seggers
Browse files
Options
Download
Email Patches
Plain Diff
add check if directories and json names match, fixed schema where that wasn't the case
parent
d1cf8776
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
EdgeAndPropertyHierarchy/frequency/frequency.json
+0
-0
EdgeAndPropertyHierarchy/frequency/frequency.json
EdgeAndPropertyHierarchy/subject/subject.json
+0
-0
EdgeAndPropertyHierarchy/subject/subject.json
TypeHierarchy/Item/CVUStateDefinition/CVUStateDefinition.json
+0
-0
...Hierarchy/Item/CVUStateDefinition/CVUStateDefinition.json
TypeHierarchy/Item/Network/Network.json
+0
-0
TypeHierarchy/Item/Network/Network.json
TypeHierarchy/Item/ProductCode/ProductCode.json
+0
-0
TypeHierarchy/Item/ProductCode/ProductCode.json
tools/helpers.js
+3
-0
tools/helpers.js
with
3 additions
and
0 deletions
+3
-0
EdgeAndPropertyHierarchy/frequency/
action
.json
→
EdgeAndPropertyHierarchy/frequency/
frequency
.json
+
0
-
0
View file @
a800891b
File moved
This diff is collapsed.
Click to expand it.
EdgeAndPropertyHierarchy/subject/
action
.json
→
EdgeAndPropertyHierarchy/subject/
subject
.json
+
0
-
0
View file @
a800891b
File moved
This diff is collapsed.
Click to expand it.
TypeHierarchy/Item/CVUStateDefinition/CVUSt
ored
Definition.json
→
TypeHierarchy/Item/CVUStateDefinition/CVUSt
ate
Definition.json
+
0
-
0
View file @
a800891b
File moved
This diff is collapsed.
Click to expand it.
TypeHierarchy/Item/Network/
Account
.json
→
TypeHierarchy/Item/Network/
Network
.json
+
0
-
0
View file @
a800891b
File moved
This diff is collapsed.
Click to expand it.
TypeHierarchy/Item/ProductCode/
Account
.json
→
TypeHierarchy/Item/ProductCode/
ProductCode
.json
+
0
-
0
View file @
a800891b
File moved
This diff is collapsed.
Click to expand it.
tools/helpers.js
+
3
-
0
View file @
a800891b
...
...
@@ -22,6 +22,9 @@ async function getHierarchy(dir, hierarchy, rootDir, hierarchyType) {
hierarchy
[
path2dir
(
filePath
,
hierarchyType
)][
'
children
'
].
push
(
dirent
.
name
);
await
getHierarchy
(
path
.
resolve
(
dir
,
dirent
.
name
),
hierarchy
,
rootDir
,
hierarchyType
);
}
else
if
(
dirent
.
name
.
split
(
'
.
'
)[
1
]
===
'
json
'
)
{
if
(
dir
.
split
(
'
/
'
).
splice
(
-
1
)[
0
]
!==
dirent
.
name
.
split
(
'
.
'
)[
0
]
&&
filePath
!==
''
)
{
console
.
log
(
`E: Directory '
${
dir
.
split
(
'
/
'
).
splice
(
-
1
)[
0
]}
' and json name '
${
dirent
.
name
}
' do not match`
);
}
let
data
=
fs
.
readFileSync
(
`
${
dir
}
/
${
dirent
.
name
}
`
);
hierarchy
[
path2dir
(
filePath
,
hierarchyType
)]
=
{...
hierarchy
[
path2dir
(
filePath
,
hierarchyType
)],
...
JSON
.
parse
(
data
)};
hierarchy
[
path2dir
(
filePath
,
hierarchyType
)][
'
path
'
]
=
hierarchyType
+
filePath
||
hierarchyType
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets