Skip to content

Show POST on the CATMAID docs page, not just GET - #100

Merged
Robbie1977 merged 1 commit into
mainfrom
catmaid-passthrough-post-support
Aug 30, 2026
Merged

Show POST on the CATMAID docs page, not just GET#100
Robbie1977 merged 1 commit into
mainfrom
catmaid-passthrough-post-support

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

Follow-up to #99, which added POST support but shipped before the docs page caught up with it — the docs page and /docs.json render every endpoint card through one shared function that hard-coded a "GET" badge (nothing else in the API was ever anything but GET, so it never needed to be data-driven). The generic /catmaid/{instance}/{command} card and all ~40 per-command runnable cards still only claimed GET.

Adds a methods field to the endpoint spec (defaults to ["GET"] everywhere else, so nothing else on the page changes) and renders one badge per method. Description text now spells out the POST body format with a curl example, and notes the page's own "Run" button still only exercises GET.

The interactive docs page and /docs.json build every endpoint card
from a shared renderer that hard-coded a single "GET" badge, because
until now every endpoint in this API was GET-only. The new /catmaid
POST route (previous commit) went live without the docs page ever
mentioning it: the generic /catmaid/{instance}/{command} card and all
~40 per-command runnable cards still only claimed GET.

Add a `methods` field to the endpoint spec (defaulting to ["GET"]
where absent, so nothing else changes) and render one badge per
method instead of a fixed string. Both the generic CATMAID command
entry and the auto-generated per-command cards now say GET and POST,
and the description spells out the body format and gives a curl
example, since the page's own "Run" button only ever issues a GET.
@Robbie1977
Robbie1977 merged commit 1a7f6f6 into main Aug 30, 2026
5 checks passed
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