Skip to content

Commit

Permalink
build: codegen to call clean on a per pkg basis
Browse files Browse the repository at this point in the history
    Primary Changes
    ---------------
    1. Updated codegen scripts of all affected packages to include a global
       openapi-generator-ignore file
    2. Created script to clean openapi folders generated by codegen for
       typescript-axios and kotlin

    Secondary Changes
    -----------------
    1. Removed duplicated code generated previously when codegen clear wasn't
       enabled
    2. Created openapi-generator-ignore file at project root for global ignore
       rules
    3. Updated package.json of all affected packages, extensions and examples

Fixes hyperledger-cacti#2736

Signed-off-by: jagpreetsinghsasan <[email protected]>
  • Loading branch information
jagpreetsinghsasan committed Oct 27, 2023
1 parent 9e66850 commit 1c71bd5
Show file tree
Hide file tree
Showing 195 changed files with 112 additions and 4,204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"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",
"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 --ignore-file-override ../../openapi-generator-ignore",
"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 --ignore-file-override ../../openapi-generator-ignore",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

docs/**
gradle/**

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

.gitignore
.npmignore
git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"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/",
"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 --ignore-file-override ../../openapi-generator-ignore",
"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/ --ignore-file-override ../../openapi-generator-ignore",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

docs/**
gradle/**

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

.gitignore
.npmignore
git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "run-p generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"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/",
"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/ --ignore-file-override ../../openapi-generator-ignore",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev webpack:prod",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

git_push.sh
.npmignore
.gitignore
4 changes: 2 additions & 2 deletions extensions/cactus-plugin-object-store-ipfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "run-p 'generate-sdk:*'",
"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",
"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 --ignore-file-override ../../openapi-generator-ignore",
"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 --ignore-file-override ../../openapi-generator-ignore",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

docs/**
gradle/**

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1c71bd5

Please sign in to comment.