Skip to content

Commit

Permalink
refactor: modular schema registration
Browse files Browse the repository at this point in the history
  • Loading branch information
eyadmba committed Apr 4, 2024
1 parent f4a51a8 commit 5b0505b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/generate-register-schemas-function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ for file in "$schemaDir"/*.json; do
schemaCalls+=" ajvInstance.addSchema(${schemaName}Json);"$'\n'
done

# trim the trailing new line
schemaCalls=$(echo "$schemaCalls" | sed '$d')

# Write the dynamic parts to the outputFile
echo "// Dynamically imported schemas" >> "$outputFile"
echo "$importStatements" >> "$outputFile"
Expand Down

0 comments on commit 5b0505b

Please sign in to comment.