hyperledger / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
338 stars 278 forks source link

build(plugin-keychain-memory-wasm): upgrade OpenAPI generator to 5.2.1 #2181

Open petermetz opened 1 year ago

petermetz commented 1 year ago

The current version (5.2.0) of the OpenAPI generator used for generating the Rust server-side code of the plugin-keychain-memory-wasm module should be upgraded to the newer one that @jagpreetsinghsasan has upgraded in a separate pull request to be 5.2.1

The upgrade for plugin-keychain-memory-wasm is not trivial (e.g. it's not just about bumping some version number in a config file) because the entire process of generating the code under packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server was done through an undocumented and unscripted manual process at the time.

Acceptance criteria:

  1. The build still works and the generated code now uses the OpenAPI generator v5.2.1
  2. packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION also shows the updated version number from point 1 above.
jagpreetsinghsasan commented 4 months ago

The current openapi-generator version is 6.6.0

jmoagacn commented 4 months ago

I would like to take on this issue, thanks!

solo-daemon commented 4 months ago

Hi @petermetz @jagpreetsinghsasan i tried to work on this issue and when i ran npm run generate-rust-server it automatically generated the code with the latest version of openapi generator but on checking git diff i realize some intentional changes were made to the generated code so we have to incorporate those changes into our generated code. Am i getting it right?

petermetz commented 4 months ago

@solo-daemon Yes, apologies about the documentation not making this clear. We do not yet have a code structure/architecture in place for this package where the generated vs. hand-written Rust code co-exist in a way that the incorporation you mentioned is automatic. So, yes, you have to put in the implementation code again manually after a fresh code generation.