Skip to content

Commit

Permalink
Added golang codegen script
Browse files Browse the repository at this point in the history
Signed-off-by: jagpreetsinghsasan <[email protected]>
  • Loading branch information
jagpreetsinghsasan committed Oct 9, 2023
1 parent eeca3f2 commit 3655b1d
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "run-p generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"watch": "npm-watch",
Expand Down
1 change: 1 addition & 0 deletions extensions/cactus-plugin-object-store-ipfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-cmd-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"codegen:openapi": "npm run generate-sdk",
"codegen:proto": "run-s proto:openapi proto:protoc-gen-ts",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"codegen:openapi": "npm run generate-sdk",
"codegen:proto": "run-s proto:protoc-gen-ts",
"generate-sdk": "run-s 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-consortium-manual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-htlc-eth-besu-erc20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-htlc-eth-besu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"codegen:openapi": "npm run generate-sdk",
"compile-contracts": "forge build",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"lint": "solhint --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-aws-sm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-azure-kv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-google-sm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-memory-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"del-wasm-pack-project-files": "del-cli src/main/typescript/generated/wasm-pack/{package.json,README.md,.gitignore}",
"generate-rust-server": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g rust-server -o ./src/main/rust/generated/openapi/rust-server",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-keychain-vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-ledger-connector-corda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "run-p generate-sdk generate-server",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"watch": "npm-watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-plugin-ledger-connector-iroha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"watch": "npm-watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected",
"generate-sdk:java": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g java -o ./src/main/java/generated/openapi/java-client/ --reserved-words-mappings protected=protected",
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"
},
Expand Down
Loading

0 comments on commit 3655b1d

Please sign in to comment.