-
Notifications
You must be signed in to change notification settings - Fork 1.2k
<api>:<version> syntax for unlisted APIs is advertised but not implemented #670
Description
Description
The error message instructs users to use <api>:<version> syntax to access unlisted APIs, but this syntax does not actually work — it produces the same error.
Steps to Reproduce
$ gws admob:v1 --help
{
"error": {
"code": 400,
"message": "Unknown service 'admob'. Known services: drive, sheets, gmail, ... Use '<api>:<version>' syntax for unlisted APIs.",
"reason": "validationError"
}
}
Expected Behavior
gws admob:v1 <resource> <method> should dynamically fetch the Discovery Document from https://www.googleapis.com/discovery/v1/apis/admob/v1/rest and expose the API commands, similar to how known services work.
Actual Behavior
The CLI parses the colon correctly (the error says Unknown service 'admob', not 'admob:v1', so splitting is happening), but resolve_service() only looks up the hardcoded SERVICES list and rejects any name not found there — with no fallback path for arbitrary Discovery API names.
The Discovery URL (https://www.googleapis.com/discovery/v1/apis/) is present in the binary, so the infrastructure exists.
Environment
- gws v0.16.0 and v0.22.5 (x86_64-unknown-linux-musl)
- Debian GNU/Linux 12 (bookworm)
Additional Context
APIs like admob:v1 and analyticsdata:v1beta are registered in Google's Discovery Service and would be useful to access via this CLI. The feature as described in the error message would unlock any Google API that exposes a Discovery Document, not just Workspace APIs.