HTTP API Openapi

Keep HTTP handlers and OpenAPI (openapi.yaml) in sync. Use when adding/changing endpoints, request/response schemas, auth requirements, or error shapes. Use when this capability is needed.

tomevault-io a75afdf 2 files · 1.8 KB Updated

File contents

Tooling assumptions

  • Use a terminal runner with bash and git available.
  • Prefer make targets when available; fall back to direct CLI commands when needed.

Source of truth

  • OpenAPI spec: openapi.yaml at the repo root.

Typical workflow

  1. Update openapi.yaml (paths, schemas, auth).
  2. Validate the spec:
make validate-openapi

If swagger-cli isn’t installed:

npm install -g @apidevtools/swagger-cli
  1. Implement the handler changes in Go (and keep auth consistent with the spec).
  2. Run tests:
make test

Project-specific notes

  • Authenticated endpoints use Bearer token auth (see README’s Auth section).
  • Be explicit about error responses and status codes in the spec when behavior changes.

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/matt-riley--mjrwtf--http-api-openapi commit a75afdf1b7

Frequently asked questions

npx skillmds@latest add tomevault-io/http-api-openapi