Skip to content

Commit

Permalink
fix: Changes based on schema update (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul authored Sep 6, 2023
1 parent feab596 commit 9df4f15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions languages/c/Types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,9 @@ function getSchemaTypeInfo(module = {}, json = {}, name = '', schemas = {}, pref
// grab the type for the non-array schema
res = getSchemaTypeInfo(module, json.items, json.items.name || name, schemas, prefix)
}

name = name.endsWith("_ArrayType") ? name.split('_ArrayType')[0] : name
name = capitalize(name)
res.name = capitalize(res.name)
prefix = prefix ? prefix + ((name !== res.name) ? name : '') : name
let n = getTypeName(getModuleName(module), res.name, prefix)
structure.name = (name && (name !== res.name)) ? name + capitalize(res.name) : res.name
let n = getTypeName(getModuleName(module), res.name, '')
structure.name = res.name
structure.type = n + 'Array_t'
structure.json = json
structure.namespace = getModuleName(module)
Expand Down
2 changes: 1 addition & 1 deletion languages/c/templates/sdk/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ done
GetVersion()
{
PackagePath=${SdkPath}/../../../../../../package-lock.json
InputKey="name\": \"@firebolt-js/openrpc"
InputKey="name\": \"@firebolt-js/sdks"
LineNo="$(grep -n "${InputKey}" ${PackagePath} | head -n 1 | cut -d: -f1)"
VersionLine=$((LineNo++))
eval "array=(`sed -n "${LineNo}p" < ${PackagePath} | sed 's/\"/\n/g'`)"
Expand Down

0 comments on commit 9df4f15

Please sign in to comment.