management-api-for-apache-cassandra icon indicating copy to clipboard operation
management-api-for-apache-cassandra copied to clipboard

Refactor OpenAPI client generation

Open emerkle826 opened this issue 2 years ago • 0 comments

Issue:

When building the project, the code in the server module generates a Swagger/OpenAPI spec document that describes all of the available endpoints. The document is then used to generate a Java client that can be used by other projects to exercise the Management API. Unfortunately, the client generation is just a stand-alone Maven project that is dumped into the generated-sources folder under the server project, and isn't compiled via the normal Maven lifecycle. To compile it, you have to first compile the project, then run Maven lifecycles on the generated source as a follow-on step.

This creates a problem where we can't test the auto-generated client in e2e/integration tests. We need to resolve this.

Definition of Done

  • [ ] The OpenAPI client is generated into a sub-module of the main project
  • [ ] The OpenAPI client is compiled during the main project Maven lifecycle
  • [ ] A separate Maven sub-module is added that depends on the current server module artifacts as well as the OpenAPI client artifacts and has integration tests that use the generated client to exercise the API
  • [ ] The new auto-generated client sub-module tests are run as part of the main project's Maven lifecycle test phase.

┆Issue is synchronized with this Jira Story by Unito

emerkle826 avatar Nov 21 '23 23:11 emerkle826