docs: correct API function-name casing and a wrong CLI example#55
Merged
Conversation
The API reference used camelCase resource prefixes (serviceAccount.*, workloadIdentity.*, envGroup.*, pullSecret.*, auditLog.*) but the real wire action names are lowercase-prefixed (serviceaccount.createKey, envgroup.list, auditlog.list, ...). Action names are matched exactly server-side, so the documented names — including two copy-pasteable curl examples that hit /auditLog.list and /envGroup.create — would 404. Verified every name against the api/client invoke strings. The camelCase *verb* parts (createKey, purgeCache, getTags, limitMetrics, ...) are the real names and are kept; only the resource prefixes were lowercased. JSON field names (envGroups/addEnvGroups) are unaffected. Also fix deployments/overview.md, where a '# pause a deployment' comment sat above a 'deploys deployment delete' command. Files: api/conventions.md, access/roles.md, access/audit-log.md, deployments/environment-variables.md, deployments/overview.md.
|
Preview deleted (PR closed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes invalid API/CLI references across the docs.
1. API function-name casing (the big one)
The API reference (
api/conventions.md"function catalog" + related prose) documented several actions with camelCase resource prefixes that don't match the real wire action names. Action names are matched exactly server-side, so these are not callable as written:serviceAccount.list/.createKey/ …serviceaccount.list/.createKey/ …workloadIdentity.*workloadidentity.*envGroup.*envgroup.*pullSecret.*pullsecret.*auditLog.listauditlog.listVerified every name against the literal
invoke(...)strings in theapi/clientpackage (the same client the CLI uses).Only the resource prefixes were lowercased. The camelCase verb parts are the real names and are intentionally kept (
createKey,deleteKey,purgeCache,getTags,getManifests,getProjectStorage,deleteManifest,limitMetrics, …). JSON field names (envGroups,addEnvGroups,removeEnvGroups) are likewise untouched.Two of the wrong names were copy-pasteable
curlexamples that would 404:content/access/audit-log.md→https://api.deploys.app/auditLog.listcontent/deployments/environment-variables.md→https://api.deploys.app/envGroup.createcontent/access/roles.mdkeeps its (correct) point that permission strings are always lowercase and differ from function names — e.g. theserviceaccount.createKeycall is guarded by theserviceaccount.key.createpermission (both confirmed to exist).2. Wrong CLI example
content/deployments/overview.mdhad a# pause a deploymentcomment sitting above adeploys deployment delete …command. Changeddelete→pause.Why
Users copy these names directly into API calls and the CLI; the catalog is billed as "fully-qualified API function[s]," and two examples were broken
curlcommands.Verification
api/client/*.goinvoke strings.route.createV2,billing.uploadTransferSlip,github.exchangeToken/.notify, etc.) are real server actions.grepconfirms zero remaining camelCase action prefixes incontent/, and allenvGroups/addEnvGroupsfield references remain camelCase.