@team-supercharge/oasg 13.2.0-feature-csharp-functions-68ad1aa3.0 → 13.2.0-feature-csharp-functions-100d975c.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "13.2.0-feature-csharp-functions-68ad1aa3.0",
3
+ "version": "13.2.0-feature-csharp-functions-100d975c.0",
4
4
  "description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
5
5
  "author": "Supercharge",
6
6
  "license": "MIT",
package/targets/common.sh CHANGED
@@ -23,10 +23,12 @@ templateDir=$9
23
23
 
24
24
  echo -e "\n=====\n version:\t$version\n binary:\t$binary\n configFile:\t$configFile\n targetId:\t$targetId\n generatorId:\t$generatorId\n openApiFile:\t$openApiFile\n formatter:\t$formatterBinary\n preRelease:\t$preRelease\n templateDir:\t$templateDir\n ---"
25
25
 
26
- for paramName in $(cat $configFile | jq -r ".targets[] | select(.id==\"$targetId\") | del(.id) | del(.type) | del(.source) | del(.generator) | del(.generatorId) | del(.templateDir) | keys | .[]"); do
27
- result=$(cat $configFile | jq -r ".targets[] | select(.id==\"$targetId\") | .$paramName")
28
- echo -e " $paramName:\t$result"
29
- eval $paramName="'$result'"
26
+ target=$(jq -r --arg targetId "$targetId" '.targets[] | select(.id==$targetId) | del(.id, .type, .source, .generator, .generatorId, .templateDir)' "$configFile")
27
+
28
+ for paramName in $(echo "$target" | jq -r 'keys | .[]'); do
29
+ result=$(echo "$target" | jq -r --arg paramName "$paramName" '.[$paramName]')
30
+ echo -e " $paramName:\t$result"
31
+ eval $paramName="'$result'"
30
32
  done
31
33
 
32
34
  echo -e "=====\n"