Skip to content

Fix example IDs and list-syndicates params in code examples - #4

Merged
gbelote merged 1 commit into
mainfrom
greg/lithium/23500-example-ids
Oct 12, 2026
Merged

gbelote merged 1 commit into
mainfrom
greg/lithium/23500-example-ids

Conversation

@gbelote

@gbelote gbelote commented Oct 9, 2026

Copy link
Copy Markdown
Member

Part of Wefunder/wefunder#23500

What changed and why

The docs site vendors examples_manifest.json as x-codeSamples, so these snippets show up on docs.wefunder.com. The installation samples used an ID prefix the API does not issue. Formats come from swagger/v2/swagger.yaml on Wefunder/wefunder master, and the replacement values are copied from its examples.

Where Before After Swagger
createInstallationToken, getInstallation, revokeInstallation "ins_9t2xExample" "inst_7hQExampleInstall01" installation ids are inst_… (example inst_7hQExampleInstall01)
examples/install_target.py, README (syndicates.get, list_syndicate_members) "syn_example" / "syn_abc123Example" "syn_aB3xQ9k2vF8mNp1zT5wY7Qc4" syndicate_id is syn_... (swagger example, full length)

The other three defects in the issue (intent_abc123, syndicates.get(42), syndicates.list(limit=...)) do not appear in this repo's examples. getIntent, getSyndicate and listSyndicates have no Python example yet. wf.syndicates.get(syndicate_id: str) and wf.intents.get(intent_id: str) are already typed as strings, so this PR makes no client changes.

The examples are edited in examples/*.py. examples_manifest.json is regenerated with python scripts/build_examples_manifest.py, not edited by hand.

Verification

Run in a venv with pip install -e ".[dev]":

$ python scripts/build_examples_manifest.py   # wrote examples_manifest.json
$ ruff check src tests scripts examples
All checks passed!
$ ruff format --check src tests scripts examples
39 files already formatted
$ pyright
0 errors, 0 warnings, 0 informations
$ pytest
170 passed (exit 0)

Found but not changed

  • spec/openapi.yaml (the synced spec copy) still has old x-codeSamples with the bad values (5 hits). It changes on the next scripts/sync_spec.py, so I did not hand-edit it.

After merge

  1. Cut a release that includes examples_manifest.json. This PR does not bump the version, tag, or release.
  2. In Wefunder/wefunder: repin api-docs/sdk-manifests.config.json to the new tag, run yarn sync-sdk-manifests, then yarn clean-api-docs all && yarn gen-api-docs all, and commit.

🤖 Generated with Claude Code

The docs site vendors examples_manifest.json as x-codeSamples, and the
installation samples used an ID prefix the API does not issue
(Wefunder/wefunder#23500):

- installations: ins_9t2xExample -> inst_7hQExampleInstall01 (inst_ prefix)
- syn_example / syn_abc123Example placeholders -> the swagger syn_ example

Example values are copied from swagger/v2/swagger.yaml. The manifest is
regenerated with scripts/build_examples_manifest.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gbelote
gbelote requested a review from rivetbot October 12, 2026 18:10

@rivetbot rivetbot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed b23ef38. No blocking findings.

The installation and syndicate example IDs match the canonical API specification, and the existing wrapper signatures and generated request paths accept these string IDs. All 16 extracted example regions match the committed manifest. The Python 3.11–3.13 checks and generated-spec consistency check passed; the 3.11 job reports 170 passing tests.

Validation was read-only source inspection, manifest comparison and CI-log review. I did not rerun tests or call the live API; sandbox e2e is intentionally skipped on pull requests. The release, docs-manifest repin and clean regeneration remain the documented follow-through for #23500.

@gbelote
gbelote merged commit 8437238 into main Oct 12, 2026
5 checks passed
@gbelote
gbelote deleted the greg/lithium/23500-example-ids branch October 12, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants