runtime

command
v1.15.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Runtime example: serve the generated OpenAPI YAML at /openapi.yaml from inside a running gone HTTP server, instead of generating it ahead of time from a CLI.

go run ./goai/examples/runtime
curl http://localhost:8080/openapi.yaml

The runtime handler caches the emitted bytes for `cacheTTL`. Set TTL > 0 in production to keep the spec request cheap; leave it at zero in local development so route changes show up on every refresh.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL