docs: correct README install and action examples, and connector.mdx scopes - #49
Conversation
…copes The README's `go install` line pointed at the retired standalone CLI module, whose build does not serialise resource-level profile or status fields. The docker example passed config flags the connector does not define. Both action arguments were documented without their value format, and the examples used a placeholder the integer check rejects. In connector.mdx, the OAuth read/write list asked for two write scopes the connector never requests, and the page was missing the account-group opt-in note and the conditional accounting scope that the published page already carries. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The MDX renderer for connector pages allows a fixed set of components and `sup` is not among them, so the footnote marker has to be a literal character. This also matches how the published page renders it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| @@ -15,12 +15,14 @@ sidebarTitle: "Coupa" | |||
| | Resource | Sync | Provision | | |||
| | :--- | :--- | :--- | | |||
| | Accounts | <Icon icon="square-check" iconType="solid" color="#c937ae"/> | | | |||
There was a problem hiding this comment.
🟡 Suggestion: The Accounts row still shows no Provision support, but userBuilder implements CreateAccount and CreateAccountCapabilityDetails (pkg/connector/users.go:207, :299), and the README change in this PR now advertises "account creation". Since this PR is aligning docs with code and edits this table, consider adding the provision check to the Accounts row so the two pages agree.
| ``` | ||
| go install github.com/conductorone/baton/cmd/baton@main | ||
| git clone --depth 1 https://github.com/ConductorOne/baton-sdk.git | ||
| cd baton-sdk && go build -o "$(go env GOPATH)/bin/baton" ./cmd/baton && cd - |
There was a problem hiding this comment.
🟡 Suggestion: go build -o will not create missing parent directories, so on a fresh Go install where $(go env GOPATH)/bin does not yet exist this line fails with "no such file or directory". Adding mkdir -p "$(go env GOPATH)/bin" before the build (or building with go build -o baton ./cmd/baton and letting the reader place it) makes the snippet copy-pasteable.
Connector PR Review: docs: correct README install and action examples, and connector.mdx scopesBlocking Issues: 0 | Suggestions: 2 | Threads Resolved: 0 Review SummaryDocumentation-only change ( Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agents |
mateoHernandez123
left a comment
There was a problem hiding this comment.
Docs-only, verified against the connector at HEAD: the corrected docker env vars match config_schema.json, the enable_user/disable_user examples and the numeric user_id format match actions.go (extractAndValidateUserId), and the connector.mdx scope edits (dropping core.business_entity.write / core.common.write, making core.accounting.read opt-in) match auth.go. MDX compiles. LGTM.
Summary
Six documentation corrections found by reading the docs against the code while validating the group
active/can_approvechange. None is a code change; all of them are places where a reader following the published instructions gets a different result than the docs promise.What changed and why
README —
## sourceinstalled a CLI that cannot show this connector's data. The line wasgo install github.com/conductorone/baton/cmd/baton@main, the retired standalone module, which pinsbaton-sdk v0.8.24. This connector builds onbaton-sdk v0.24.6and writes resource-level carriers (WithResourceProfile,WithResourceStatus); a pre-v0.19 reader does not serialise those fields at all, so a correct bundle printsprofile: nulland a disabled user reportsSTATUS_ENABLED. Measured against the same bundle with both binaries. Replaced with clone-and-build, becausego installcannot be used here at all —baton-sdk's module carriesreplacedirectives andgo installrejects those. The replacement command was run end to end before documenting it.README — the docker example could not authenticate. It passed
BATON_DOMAIN_URL,BATON_API_KEYandBATON_USERNAME;pkg/config/config.godefines onlycoupa-client-id,coupa-client-secretandcoupa-domain. Verified from the config declaration.README and connector.mdx — both action arguments lacked their value format.
user_idwas documented as "The ID of the user", butpkg/connector/actions.gorunsstrconv.Atoiand then requires a positive integer. The README's own examples passed the literal placeholder"USER_ID", which fails on that check. Both now say it is the numericidfrom/api/users, and the examples pass a number. Verified from the validation path.README — the intro and Data Model described a read-only connector. The only capability prose was "will pull down information about", while the connector declares and implements provisioning on five resource types plus account provisioning.
--provisioningappeared only inside the pasted--helpoutput. The intro sentence now follows the same shape as the other connector READMEs, and the flag requirement is stated once.connector.mdx — the read/write scope list asked for two scopes the connector never requests.
core.business_entity.writeandcore.common.writewere listed;ScopesReadWriteinpkg/connector/client/auth.goadds onlycore.user_group.writeandcore.user.write. Removed both, so readers stop over-granting. Verified from the scope declaration.connector.mdx — the page was missing the account-group opt-in note and the conditional accounting scope.
core.accounting.readis appended only when account-group sync is enabled, behind a resource-type toggle, and the page presented it as unconditionally required with no mention of the opt-in. The published page already carries both; this brings the source file in line with it, so the next docs sync does not drop them.Not changed, deliberately
brewline is correct as it stands: theconductorone/batontap's formula is GoReleaser-generated and installs the CLI fromConductorOne/baton-sdkreleases. The tap name resembling the retired repo is a coincidence.ghcr.io/conductorone/baton:latestreference is left alone.baton-sdk's.goreleaser.yamlpublishes no container image, so that image's provenance — and therefore whether it has the same stale-reader problem — could not be established here. Worth a look by someone who can inspect the image.AUTO-GENERATEDmarkers without a generator wired behind them would advertise a regeneration that never happens.For the reviewer
The two lines most worth a second look are the
go installreplacement (a behavioural claim aboutgo installandreplacedirectives, which the commit's command was tested against) and the scope removals (check them againstpkg/connector/client/auth.gorather than against the previous list).