Skip to content

update API spec and add some tests for it - #600

Merged
paulfitz merged 3 commits into
gristlabs:masterfrom
paulfitz:paulfitz/flesh-out-apidocs
Feb 5, 2026
Merged

update API spec and add some tests for it#600
paulfitz merged 3 commits into
gristlabs:masterfrom
paulfitz:paulfitz/flesh-out-apidocs

Conversation

@paulfitz

@paulfitz paulfitz commented Jan 29, 2026

Copy link
Copy Markdown
Member

This updates api/grist.yml based on setting a bot loose on the grist-core source code and asking it to look for undocumented endpoints or wrong information.

To make sure the yml is solid OpenAPI code, the bot is directed to exercise the spec using swagger-client. The tests added are machine written, with human nudges to make them useful. The bot has limited understanding of Grist, but some sanity check of the yml seems much better than none.

The bottleneck on keeping API docs up to date has been mostly developer time, it isn't a hard task, so this does seem a plausible job to offload. An alternative would be to change how endpoints are created in grist-core to make them self-documenting. This is still a possibility, but there isn't an obviously great way to do it.

Remember, the point of this change is to flesh out api/grist.yml, everything else is just to sanity-check it.

@netlify

netlify Bot commented Jan 29, 2026

Copy link
Copy Markdown

Deploy Preview for grist-help-preview ready!

Name Link
🔨 Latest commit 4a1d3ac
🔍 Latest deploy log https://app.netlify.com/projects/grist-help-preview/deploys/6984b9ea0bf604000877dca5
😎 Deploy Preview https://deploy-preview-600--grist-help-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread api/test/docs.test.js Outdated
@paulfitz
paulfitz marked this pull request as ready for review January 30, 2026 04:09
@georgegevoian
georgegevoian self-requested a review February 5, 2026 06:57
This updates api/grist.yml based on setting a bot loose on the
`grist-core` source code and asking it to look for undocumented
endpoints or wrong information.

To make sure the `yml` is solid OpenAPI code, the bot is directed
to exercise the spec using `swagger-client`. The tests added are
machine written, with human nudges to make them useful. The bot
has limited understanding of Grist, but some sanity check of the
`yml` seems much better than none.

The bottleneck on keeping API docs up to date has been mostly
developer time, it isn't a hard task, so this does seem a
plausible job to offload. An alternative would be to change
how endpoints are created in `grist-core` to make them
self-documenting. This is still a possibility, but there isn't
an obviously great way to do it.
@paulfitz
paulfitz force-pushed the paulfitz/flesh-out-apidocs branch from cdbb47b to 4a1d3ac Compare February 5, 2026 15:40

@georgegevoian georgegevoian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Scanned the tests and they look reasonable. Thanks @paulfitz!

@paulfitz
paulfitz merged commit 131dc44 into gristlabs:master Feb 5, 2026
5 of 6 checks passed
@paulfitz
paulfitz deleted the paulfitz/flesh-out-apidocs branch February 5, 2026 19:53
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