Skill Claude CodeCodex
JWTAuth extracts the token, verifies the signature, optionally enforces claims, and stores claims in the context.
Skill Claude CodeCodex
JWTAuth extracts the token, verifies the signature, optionally enforces claims, and stores claims in the context.
Skill Claude CodeCodex
The okapicli package adds typed flags, env-variable binding, subcommands, and lifecycle hooks to an Okapi app.
Skill Claude CodeCodex
Skill "context" from jkaninda/okapi-skills, covering okapi context utilities, data store (thread-safe), request inspection, path & query parameters and form data & uploads.
Skill Claude CodeCodex
Okapi can enable/disable individual routes, whole groups, and OpenAPI documentation at runtime. Disabled routes respond with 404 — no redeploy required, and the OpenAPI document refreshes automatically.
Skill Claude CodeCodex
Handlers return error. The Abort helpers write a response through the configured ErrorHandler and return an error you propagate; the Error helpers write a fixed JSON envelope directly, bypassing the handler. Three formats ship in the box: the default JSON envelope, a fully custom handler, and RFC 7807 Problem Details.
Skill Claude CodeCodex
Skill "http_client" from jkaninda/okapi-skills, covering okapi http client (okapi/client package), quick start, client options, request builder and terminal methods.
Skill Claude CodeCodex
Middleware and MiddlewareFunc are type aliases of HandlerFunc — func(Context) error. Inside a middleware, call c.Next() to pass control down the chain. Anything before c.Next() runs on the way in, anything after runs on the way out.
Skill Claude CodeCodex
Okapi generates OpenAPI from your routes and serves three interactive UIs. The default document is OpenAPI 3.1 (JSON Schema 2020-12); a 3.0 view is served alongside for legacy consumers.
Skill Claude CodeCodex
Skill "overview" from jkaninda/okapi-skills, covering okapi overview, project structure, core types, constructors and app configuration.
Skill Claude CodeCodex
Binding populates a struct from the request by inspecting struct tags and the Content-Type. Validation runs automatically at the end of c.Bind — the tags are documented in the validation/ skill.
Skill Claude CodeCodex
For aborts, error handlers, and RFC 7807 Problem Details, see the errorhandling/ skill.
Skill Claude CodeCodex
Okapi's RouteDefinition is a declarative alternative to imperative route registration (.Get(), .Post(), etc.). Instead of chaining method calls, you describe each route as a struct and register it with app.Register(). This keeps route metadata — method, path, handler, documentation, middleware — in one place, making…
Skill Claude CodeCodex
Get(path, handler, ...RouteOption) Route Post(path, handler, ...RouteOption) Route Put(path, handler, ...RouteOption) Route Delete(path, handler, ...RouteOption) Route Patch(path, handler, ...RouteOption) Route Head(path, handler, ...RouteOption) Route Options(path, handler, ...RouteOption) Route Any(path, handler…
Skill Claude CodeCodex
Okapi provides built-in SSE support for real-time server-to-client streaming over HTTP. SSE connections are long-lived GET requests where the server pushes events using the text/event-stream content type. The framework handles headers, flushing, keep-alive pings, and serialization automatically.
Skill Claude CodeCodex
Okapi implements http.Handler and accepts standard handlers and middleware, so a net/http codebase can be migrated incrementally.
Skill Claude CodeCodex
Okapi renders HTML through a Renderer. The built-in Template type wraps html/template and loads from a directory, a glob pattern, an embedded FS, or a config struct.
Skill Claude CodeCodex
Two pieces: okapi's test server / test context, and the okapitest package's fluent request builder and assertions.
Skill Claude CodeCodex
Skill "tls_https" from jkaninda/okapi-skills, covering okapi tls & https, loading a tls config, https-only server, dual http + https and mutual tls (client certificates).
Skill Claude CodeCodex
Validation is declarative: struct tags drive both runtime enforcement and OpenAPI schema generation. Validation runs automatically inside c.Bind and inside the typed handler wrappers (okapi.Handle, okapi.H, okapi.HandleIO, okapi.HandleO).
Skill Claude CodeCodex
Okapi serves a front-end application (React, Vue, Svelte, Angular, …) alongside the API. Real files are served directly; any unmatched path under the prefix falls back to the index document so the client-side router takes over.
Skill Claude CodeCodex
WebSocket support ships as a separate, framework-agnostic package. It works with Okapi handlers and with plain net/http.