Skip to content

Commit a1ec3d2

Browse files
committed
Split config.json into config-dotnet.json, config-node.json
1 parent 62f24aa commit a1ec3d2

6 files changed

Lines changed: 22 additions & 21 deletions

File tree

codegen/config-dotnet.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"packageName": "Aspose.BarCode.Cloud.Sdk",
3+
"packageVersion": "26.3.0",
4+
"targetFramework": "netstandard2.0"
5+
}

codegen/config-node.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"npmName": "aspose-barcode-cloud-node",
3+
"npmVersion": "26.3.0",
4+
"supportsES6": true
5+
}

codegen/config.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

codegen/generate-dotnet.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ fi
1313

1414
# Templates src https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp
1515
# Generate Operations and Models for Debug purposes
16-
# java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config.json > debugOperations.cs.json ; exit
17-
# java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config.json > debugModels.cs.json ; exit
18-
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config.json
16+
# java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config-dotnet.json > debugOperations.cs.json ; exit
17+
# java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config-dotnet.json > debugModels.cs.json ; exit
18+
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g csharp -t Templates/csharp -o $tempDir -c config-dotnet.json
1919

2020
# python Tools/split-cs-file.py $tempDir/src/Aspose.BarCode.Cloud.Sdk/Api/GenerateApi.cs $tempDir/src/Aspose.BarCode.Cloud.Sdk/Model/Requests/
2121
# python Tools/split-cs-file.py $tempDir/src/Aspose.BarCode.Cloud.Sdk/Api/ScanApi.cs $tempDir/src/Aspose.BarCode.Cloud.Sdk/Model/Requests/

codegen/generate-node.bash

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ then
1111
fi
1212

1313
# java -jar Tools/openapi-generator-cli.jar config-help -g typescript-node
14-
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config.json
15-
# java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config.json > debugModels.ts.json; exit
16-
# java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config.json > debugOperations.ts.json; exit
17-
# java -DdebugSupportingFiles -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config.json 2> debugSupportingFiles.ts.txt
14+
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json
15+
# java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json > debugModels.ts.json; exit
16+
# java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json > debugOperations.ts.json; exit
17+
# java -DdebugSupportingFiles -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs -o $tempDir -c config-node.json 2> debugSupportingFiles.ts.txt
1818

1919
mv "$tempDir/api.ts" "$targetDir/src/"
2020
mv "$tempDir/package.json" "$targetDir/"
2121
mv "$tempDir/git_push.sh" "$targetDir/src/models.ts"
2222

2323
# Use typescript-node one more time because typescript-node does not generate docs
24-
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config.json
25-
#java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config.json > debugModels.node.json
26-
#java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config.json > debugOperations.node.json
24+
java -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json
25+
#java -DdebugModels -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json > debugModels.node.json
26+
#java -DdebugOperations -jar Tools/openapi-generator-cli.jar generate -i "$specSource" -g typescript-node -t Templates/nodejs/docs -o $tempDir/docs -c config-node.json > debugOperations.node.json
2727

2828
mv "$tempDir/docs/api.ts" "$targetDir/docs/index.md"
2929
mv "$tempDir/docs/git_push.sh" "$targetDir/docs/models.md"

scripts/new-version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ def set_java_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config
4242
save_config(config, filename)
4343

4444

45-
def set_net_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.json")):
45+
def set_net_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-dotnet.json")):
4646
config = read_config(filename)
4747
config["packageVersion"] = str.join(".", map(str, new_version))
4848
save_config(config, filename)
4949

5050

51-
def set_node_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.json")):
51+
def set_node_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-node.json")):
5252
config = read_config(filename)
5353
config["npmVersion"] = str.join(".", map(str, new_version))
5454
save_config(config, filename)

0 commit comments

Comments
 (0)