Skip to content

fix(java): Fix java wire tests for sdks with oauth#11335

Merged
jsklan merged 5 commits intomainfrom
jsklan/fix-java-oauth
Dec 18, 2025
Merged

fix(java): Fix java wire tests for sdks with oauth#11335
jsklan merged 5 commits intomainfrom
jsklan/fix-java-oauth

Conversation

@jsklan
Copy link
Contributor

@jsklan jsklan commented Dec 18, 2025

Description

Fixes several bugs in Java V2 generator affecting wire tests, dynamic snippets, and streaming endpoint support for OAuth-enabled APIs.

Changes Made

  • OAuth support: Add withCredentials() pattern for OAuth APIs in dynamic snippets and wire tests instead of using standard builder() pattern
  • Streaming endpoints: Fix return type generation to use Iterable<T> instead of incorrectly using Optional<T> for streaming responses
  • ArrayList import: Fix missing java.util.ArrayList import when generating empty list literals
  • Wire test cleanup: Remove incorrect "Stream" suffix transformation that was adding invalid method names

Testing

  • Ran seed generation with custom OAuth project
  • Verified ./gradlew compileJava passes
  • Verified ./gradlew test passes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

@jsklan jsklan marked this pull request as ready for review December 18, 2025 21:05
@jsklan jsklan enabled auto-merge (squash) December 18, 2025 21:42
@jsklan jsklan merged commit 11efbd0 into main Dec 18, 2025
135 checks passed
@jsklan jsklan deleted the jsklan/fix-java-oauth branch December 18, 2025 22:06
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