Skip to content

Commit

Permalink
refactor: Update attributeYamlUtils and componentsUtils to handle def…
Browse files Browse the repository at this point in the history
…ault values
  • Loading branch information
extedcouD committed Jul 12, 2024
1 parent 1f259a3 commit f84bd70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function exploreObject(subObj, currentPath, detailedPaths) {
) {
// Check if the object at this path has the specific properties
if (
["required", "type", "owner", "usage"].every((prop) =>
["required", "usage"].every((prop) =>
subObj[key].hasOwnProperty(prop)
)
) {
Expand All @@ -167,9 +167,9 @@ function exploreObject(subObj, currentPath, detailedPaths) {
detailedPaths.push({
path: newPath,
required: req ? req : subObj[key].required,
type: subObj[key].type,
owner: subObj[key].owner,
usage: subObj[key].usage,
type: subObj[key].type ?? "String",
owner: subObj[key].owner ?? "BAP/BPP",
usage: subObj[key].usage ?? "General",
description: subObj[key].description ?? "TBD",
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ async function createExamples(
for (const example in yamlData.example_set) {
if (example.includes("form")) continue;
for (const set of yamlData.example_set[example].examples) {
set.summary = set.summary ? set.summary : example + set.description;
example_cache.push({
$ref: `../../examples/${domain}/${example}/${set.summary
.trim()
Expand Down

0 comments on commit f84bd70

Please sign in to comment.