Client Generation#
These guides cover consuming the REST/RPC endpoints the advanced template serves — they are not clients for the pgmi deployment CLI.
The advanced template serves an OpenAPI 3.1 specification at GET /openapi.json and an interactive explorer at GET /docs. Use these to generate typed clients in any language.
The spec is not hand-written — it is derived live from the same handler registry that routes REST, RPC, and MCP, so it can never drift from the deployed surface:
pgmi does not ship client libraries. Your deployment owns the spec; your pipeline owns the client.
Quick Start#
- Deploy your project with pgmi
- Open
http://localhost:3000/docsfor the interactive API explorer - Pick a language below and generate a typed client
Language Recipes#
| Language | Tool | Recipe |
|---|---|---|
| TypeScript | openapi-typescript | TypeScript |
| Go | oapi-codegen | Go |
| Python | openapi-python-client | Python |
| C# | NSwag | C# |
| Any | openapi-generator | Generic |
HTTP Collections#
For ad-hoc exploration without codegen, see HTTP collections to generate importable request files for Bruno, VS Code REST Client, or IntelliJ.
Philosophy#
These recipes teach the approach, not pinned versions. The spec is the source of truth; the generated client is a downstream artifact in your CI pipeline. When your handlers change, re-run the generator.