Skip to content

Conversation

@tstanmay13
Copy link
Contributor

@tstanmay13 tstanmay13 commented Dec 8, 2025

Description

Fixes a bug where OAuthTokenSupplier generates builder method calls in the wrong order when the request type uses a staged builder pattern, causing compilation errors.

Link to Devin run: https://app.devin.ai/sessions/3ae49b867faa4a76824cfd908f05cea2
Requested by: [email protected] (@tstanmay13)

Changes Made

  • Implemented the visitReference() method in OAuthTokenSupplierGenerator.getOrderedBuilderProperties() to properly look up type declarations and extract properties in declaration order
  • Added test fixture java-oauth-staged-builder that validates builder method ordering with a custom OAuth property (apiKey) before clientId and clientSecret
  • Added changelog entry for version 3.23.2

Testing

  • Seed test passes for new java-oauth-staged-builder fixture
  • Regression tests pass for oauth-client-credentials and oauth-client-credentials-custom fixtures
  • Lint checks pass (pnpm run check)
  • Java spotless formatting applied

Human Review Checklist

  • Verify the visitReference() implementation correctly handles edge cases (null type declarations, non-object types)
  • Important: The test fixture uses an inlined body (body: properties:), which exercises visitInlinedRequestBody(). Consider whether a referenced body type test case should also be added to directly test the visitReference() code path
  • Verify property ordering from objectType.getProperties() preserves declaration order as expected

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants