Show POST on the CATMAID docs page, not just GET - #100
Merged
Conversation
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.
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.
Follow-up to #99, which added POST support but shipped before the docs page caught up with it — the docs page and
/docs.jsonrender 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
methodsfield 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.