Skip to content

fix(management_api): decode organization connections as plain objects - #63

Open
dtoxvanilla1991 wants to merge 1 commit into
mainfrom
fix/organization-connections-empty-properties
Open

fix(management_api): decode organization connections as plain objects#63
dtoxvanilla1991 wants to merge 1 commit into
mainfrom
fix/organization-connections-empty-properties

Conversation

@dtoxvanilla1991

Copy link
Copy Markdown
Contributor

Supersedes #55.

Explain your changes

GetConnectionsResponse.Connections (returned by GetOrganizationConnections and GetConnections) decoded each array entry as Connection, the envelope type meant for a single-connection response ({code, message, connection: {...}}). The Kinde API actually returns plain connection objects (id, name, display_name, strategy) directly in that array, so every field ended up empty for callers.

This reimplements #55's core fix with a smaller footprint:

  • Fix/organization connections empty properties #55 vendored a local copy of the full management API spec and ran ogen --clean against it, regenerating the entire SDK and pulling in unrelated, breaking changes (e.g. a DeleteAPIAppliationScopeDeleteAPIApplicationScope rename, a new required field on CreateApiKeyReq) alongside spec drift against current main.
  • Instead, this PR adds fix_organization_connections.go, a go:generate patch step following the repo's existing convention (fix_optstring.go, fix_oneof.go, and fix(management_api): decode identity_id in CreateUserIdentity response #62's fix_identity_id.go) that types Connections as []ConnectionConnection and updates the encoder/decoder, with no vendored spec and no unrelated regen.
  • Fix/organization connections empty properties #55 also bundled an unrelated invitation-code feature for authorization_code (GetAuthURLWithInvitation, WithInvitationCode). That's already present on main via a separate PR, so it isn't part of this change.
  • Test files from Fix/organization connections empty properties #55 covering the decode/encode/integration behavior are carried over unchanged.

Checklist

GetConnectionsResponse.Connections (used by GetOrganizationConnections
and GetConnections) decoded each array entry as Connection, the
envelope type for a single-connection response ({code, message,
connection: {...}}). The Kinde API returns plain connection objects
(id, name, display_name, strategy) directly in that array, so every
field ended up empty.

Add fix_organization_connections.go, a go:generate patch step
(matching the existing fix_optstring.go / fix_oneof.go / fix_identity_id.go
convention) that types Connections as []ConnectionConnection and
updates the encoder/decoder accordingly, with no vendored spec.

Reimplements #55's core fix without the unrelated
invitation-code changes (already present on main) or the full vendored-
spec SDK regen. Test files carried over from that PR.

Co-authored-by: BrandtKruger <brandt.kruger087@gmail.com>
@dtoxvanilla1991
dtoxvanilla1991 requested a review from a team as a code owner August 25, 2026 23:50
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 45 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae8cfaa9-b81e-4bff-b477-32026cf063d5

📥 Commits

Reviewing files that changed from the base of the PR and between e816055 and 02dc0e5.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • kinde/management_api/fix_organization_connections.go
  • kinde/management_api/generate.go
  • kinde/management_api/get_connections_response_test.go
  • kinde/management_api/get_organization_connections_integration_test.go
  • kinde/management_api/oas_json_gen.go
  • kinde/management_api/oas_schemas_gen.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dtoxvanilla1991 dtoxvanilla1991 self-assigned this Aug 25, 2026
@dtoxvanilla1991
dtoxvanilla1991 requested a review from a team August 25, 2026 23:55

@shafaladhikari shafaladhikari left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants