Android Developer: `productId` argument required inconsistency
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
The issue points to the AndroidPublisher.java file line 21976 where a precondition check on subscriptionId occurs. First, examine the generated client library structure and the API specification to understand the parameter requirement. Check if the method can be overloaded or the precondition relaxed. Running the provided code example will reproduce the error. Verify the fix by testing with a null subscriptionId as per the API docs.
Written by the indexing model from the issue text.
Description
hi!
in the Android Developer API, the purchases.subscriptions.acknowledge method has a subscriptionId path parameter, which the docs specify is not required and not recommended in some scenarios (docs link).
it seems the Java client library in this repo has a non-null precondition on subscriptionId, failing the request client-side (see code). should this be updated in the generated client library, either by overloading this method or allowing null values for this param?
Environment details
google-api-services-androidpublisher version: v3-rev20260909-2.0.0 (maven central)
Code example
client.purchases()
.subscriptions()
.acknowledge(appName, null, purchaseToken, requestBody) // throws precondition error
.execute();
External references such as API reference guides
- https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/acknowledge#path-parameters
- https://github.com/googleapis/google-api-java-client-services/blob/main/clients/google-api-services-androidpublisher/v3/2.0.0/com/google/api/services/androidpublisher/AndroidPublisher.java#L21976
- Dominant language
- Java
- Stars
- 725
- Forks
- 394
- Avg merge
- 45m
- Merged PRs (30d)
- 240
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-api-java-client-services
-
priority: p3 type: docs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
priority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
googleapis/google-api-java-client-services#29581 · 2 comments ·
-
priority: p3 type: feature request
Difficulty 4/5 3-5 days Newbie friendliness 38/100
googleapis/google-api-java-client-services#29317 · 1 comment ·
-
priority: p3 type: bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
googleapis/google-api-java-client-services#26505 · 7 comments · 1 reaction ·
-
priority: p3 type: bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in googleapis/google-api-java-client-services
Similar issues
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Needs: Triage Type: Feature request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·