feat: add OpenAPI-generated API client - #1
Merged
Conversation
openapi generator (java, native library, pinned 7.23.0) generates the
API client from convoy's docs/v3/openapi3.yaml. scripts/generate.sh
mirrors only com.getconvoy.{api,client,models}; the hand-written verify
package is never touched. sdk_generation.yaml matches the convoy
dispatcher contract (filename + force/feature_branch inputs) used by
convoy.js and convoy-python, and compiles + tests before opening a PR.
output of scripts/generate.sh against convoy main's openapi3.yaml. event data fields are open maps (Map<String, Object>) and a round-trip regression test guards against payload keys being dropped.
offline contract test proves verb, path, auth header, and JSON body for createEndpointEvent against a local JDK http server. the regen workflow now checks out main explicitly so a dispatch from another ref cannot commit generated output onto the wrong base.
2 tasks
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dea19e6. Configure here.
refs/heads/main would bypass the literal main check and force-push the default branch. refs/* is now rejected like other protected shapes.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
/api/v1client via OpenAPI Generator (java,nativelibrary — JDKjava.net.http+ Jackson, pinned 7.23.0), following the same pattern as convoy-python: hand-written webhook verify is untouched,scripts/generate.shmirrors onlycom.getconvoy.{api,client,models}..github/workflows/sdk_generation.yamlmatching the frain-dev/convoy dispatcher contract (filename +force/feature_branchinputs). It compiles and runs the test suite before opening a regen PR, and only opens a PR when generation produced a diff.EventDataRoundTripTestguards the open-map contract for eventdata(fix(controlplane): mark arbitrary-JSON object fields as open maps in OpenAPI spec convoy#2737); newEventsApiContractTestproves verb/path/auth/body offline against a local HTTP server. 25/25 green.Known upstream wart (accepted): generated response decoding uses the JVM default charset. From JDK 18+ (JEP 400) that is UTF-8; patching generated files would churn on every regen.
Test plan
./scripts/generate.shruns locally and syncs only the three generated packages./gradlew test— 25/25 green on the Java 11 targetNote
Medium Risk
Very large generated public API and new runtime deps increase maintenance and semver surface; CI can force-push branches but is gated on tests and branch-name validation.
Overview
Adds an OpenAPI-generated Convoy API client alongside the existing hand-written webhook verifier, bumps the library to 0.2.0, and wires up repeatable regeneration.
scripts/generate.shpulls Convoy’sopenapi3.yaml, runs OpenAPI Generator (java,native/java.net.http, pinned 7.23.0), and rsyncs onlycom.getconvoy.{api,client,models}socom.getconvoy.webhookis never overwritten. Gradle gains Jackson/Jakarta dependencies for the generated code; README documents API usage and local regen..github/workflows/sdk_generation.yamlmatches the other SDK repos’ dispatcher contract: weekly/dispatch regen frommain,./gradlew testbefore any PR, skip PR when there’s no diff, validatedfeature_branch, and optionalSDK_BOT_PATso PR CI can run.The bulk of the diff is generated API/model sources (e.g. endpoints, events, deliveries) exposing the full Convoy HTTP surface to Java consumers.
Reviewed by Cursor Bugbot for commit 486cceb. Bugbot is set up for automated code reviews on this repo. Configure here.