-
Notifications
You must be signed in to change notification settings - Fork 2
Examples
Dipjyoti Metia edited this page May 17, 2026
·
1 revision
All examples live in examples/. Each is a complete, runnable demo.
| Directory | What it shows |
|---|---|
examples/todos |
Two real binaries: todos-server (standalone HTTP backend with graceful shutdown, request logging, /healthz) and todos-mcp (MCP proxy forwarding every tool call over HTTP). Ships a README with MCP client configs for Claude Desktop, Claude Code, Cursor, VS Code, and Inspector. Start here. |
| Directory | What it shows |
|---|---|
examples/petstore |
OpenAPI 3.0, JSON bodies, official go-sdk backend. |
examples/petstore-mark3labs |
Same spec on the mark3labs/mcp-go backend — diff is one import + one constructor line. |
examples/swagger2-petstore |
Swagger 2.0 input via -emit-v3 conversion. |
| Directory | What it shows |
|---|---|
examples/users-api |
UUID path params, required headers, PUT / PATCH / DELETE methods. |
examples/library |
Swagger 2.0 end-to-end (load → convert → generate). |
examples/complex |
Recursive $ref, oneOf / allOf, enums, date-time / uuid formats. |
examples/non-json-bodies |
Form-urlencoded, multipart (with base64 file fields), octet-stream, text/plain, XML. |
make regen-examples # regenerates oapi-codegen + mcp output for every example
make smoke # boots petstore over stdio, calls initialize + tools/listregen-examples requires oapi-codegen on PATH.
Repo · Releases · Issues · Discussions · Apache 2.0
Get started
Modes
Features
Deploy
Reference
Project