feat: regenerate client from corrected OpenAPI spec#12
Merged
Conversation
regenerated the php client from the spec produced by frain-dev/convoy#2742, which fixes nullable object/map handling, the bearer auth security scheme, json-only onboard, and portal link endpoints_metadata nullability. adds a yq pre-processing step to scripts/generate.sh that unwraps items: {allOf: [{$ref}], nullable: true} to items: {$ref} before generation, working around the php generator mangling the wrapper into a namespace-less class reference in DatastorePortalLinkResponse. contract test and README updated to setAccessToken bearer auth.
scripts/generate.sh rewrites the spec with yq before running the generator; the workflow only set up java and php, so regeneration depended on the runner image shipping yq. install v4.44.3 explicitly and verify its sha256 before use.
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
endpoints_metadatanullability).scripts/generate.shthat unwrapsitems: {allOf: [{$ref}], nullable: true}toitems: {$ref}before generation, working around the PHP generator mangling the wrapper into a namespace-less class reference inDatastorePortalLinkResponse.setAccessTokenbearer auth.Test plan
Note
Medium Risk
Large generated-client refresh touches auth headers and nullable deserialization across the SDK; integrators must switch from API-key helpers to
setAccessToken, but behavior matches the updated spec and tests reportedly pass.Overview
Regenerates the PHP client from Convoy’s updated OpenAPI spec and documents the new auth pattern: callers use
Configuration::setAccessToken()(the client adds theBearerprefix) instead of manualAuthorizationAPI-key setup.Generation pipeline:
scripts/generate.shnow runs yq before OpenAPI Generator to unwrapitems: {allOf: [{$ref}], nullable: true}into a plain$ref, avoiding broken PHP class names for portal-linkendpoints_metadata. SDK generation CI installs a pinned, checksum-verified yq v4.44.3.Generated API surface: All API clients send
Authorization: Bearer …viagetAccessToken().OnboardApi::bulkOnboardtakesModelsBulkOnboardRequestwithapplication/jsoninstead of a rawSplFileObject/ octet-stream body.Models: Widespread alignment with the spec—nullable fields accept JSON
null(setters trackopenAPINullablesSetToNullinstead of throwing), enums gain an empty-string variant where needed, and errordatais typed asarray<string,mixed>rather than a generic object.Reviewed by Cursor Bugbot for commit 3980dce. Bugbot is set up for automated code reviews on this repo. Configure here.