Commits (4)
[submodule "ARF005"]
path = ARF005WorldStorageAPI
url = https://forge.etsi.org/rep/arf/arf005.git
Subproject commit aaf4295668539d5ce805dfd9fa1c4679377e8038
# Description # Description
This is a small project generating the C# client code and dll for the ISG ARF World Storage. This is a small project generating the C# client code and DLLs for the ISG ARF World Storage.
# How to checkout
This project contains a submodule. This submodule contains the OpenAPI specification of the ISG ARF World Storage. To correctly compile the project you also need to checkout the submodule. See git submodules (https://git-scm.com/book/en/v2/Git-Tools-Submodules) for more information.
The simplest way to check out the project including the submodule is to use the following command:
git clone --recurse-submodules https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-csharp-client.git
# How to update the API specification
The referenced submodule contains the OpenAPI specification of the ISG ARF World Storage. To checkout the newest version of it use the following commands:
cd ARF005WorldStorageAPI
git checkout master
cd ..
# Code Generation # Code Generation
To generate the code use the following commands: To generate the code and the DLLs use the following commands:
npm install npm install
npm run generate
npm run build npm run build
The library is then contained in the folder `generated_client/src/Org.OpenAPITools/bin/Debug/netstandard2.0/Org.OpenAPITools.dll`. The generated library and its depencies are then contained in the folder `generated_client/bin`.
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
}, },
"devDependencies": { "devDependencies": {
"@openapitools/openapi-generator-cli": "^2.4.23", "@openapitools/openapi-generator-cli": "^2.4.23",
"dotnet-sdk-3.1": "^3.1.1007" "dotnet-sdk-3.1": "^3.1.1007",
"run-script-os": "^1.1.6"
} }
}, },
"node_modules/@nestjs/common": { "node_modules/@nestjs/common": {
...@@ -983,6 +984,16 @@ ...@@ -983,6 +984,16 @@
"node": ">=0.12.0" "node": ">=0.12.0"
} }
}, },
"node_modules/run-script-os": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/run-script-os/-/run-script-os-1.1.6.tgz",
"integrity": "sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==",
"dev": true,
"bin": {
"run-os": "index.js",
"run-script-os": "index.js"
}
},
"node_modules/rxjs": { "node_modules/rxjs": {
"version": "7.5.1", "version": "7.5.1",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.1.tgz", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.1.tgz",
...@@ -1906,6 +1917,12 @@ ...@@ -1906,6 +1917,12 @@
"integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
"dev": true "dev": true
}, },
"run-script-os": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/run-script-os/-/run-script-os-1.1.6.tgz",
"integrity": "sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==",
"dev": true
},
"rxjs": { "rxjs": {
"version": "7.5.1", "version": "7.5.1",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.1.tgz", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.1.tgz",
......
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
"description": "ISG ARF World Storage C# Client", "description": "ISG ARF World Storage C# Client",
"scripts": { "scripts": {
"clean": "rm -rf generated_client", "clean": "rm -rf generated_client",
"generate": "npx @openapitools/openapi-generator-cli generate -i ../ISG-ARF-005-API/API/OpenAPI.yml -g csharp-netcore -o generated_client", "build": "npx @openapitools/openapi-generator-cli generate -i ../ISG-ARF-005-API/API/OpenAPI.yml -g csharp -o generated_client && run-script-os",
"build": "dotnet build generated_client" "build:win32": "cd generated_client && build.bat",
"build:default": "cd generated_client && build.sh"
}, },
"devDependencies": { "devDependencies": {
"@openapitools/openapi-generator-cli": "^2.4.23", "@openapitools/openapi-generator-cli": "^2.4.23",
"dotnet-sdk-3.1": "^3.1.1007" "dotnet-sdk-3.1": "^3.1.1007",
"run-script-os": "^1.1.6"
}, },
"dependencies": { "dependencies": {
"dotnet-3.1": "*" "dotnet-3.1": "*"
......