For AI agents: a documentation index is available at /llms.txt — markdown versions of all pages are available by appending index.md to any URL path.

Microblog

Woohoo, it's live!

Documentation

Woohoo, it's live! For all my documentarian pals who manually maintain OpenAPI specs, here's a tool you might find useful: OASprey, a package that lets you use the Jest testing framework to validate that real API calls match your API spec.

In this screenshot, we're looking at a Jest test file where we load an OpenAPI spec from our docs, call various endpoints, and assert that the status is 200 and the response we get satisfies the API spec. You can either load the published spec from a URL or the pre-published spec from a local file, depending on your needs.

Each test fails if we get fields or types in the actual response that do not match the fields and types in the API spec. By running the tests regularly, we can validate that the underlying API we've documented still matches the spec. If new fields are added, types are changed, or other breaking changes happen, failing tests will alert us that we need to update the API spec.

This isn't net new - it's a hard fork and modernization of an abandoned utility - but now it's available via npm. Links in comments. Happy testing!

Links from the comments:

All microblog posts · RSS