Skip to main content
HTTPAPI keeps an endpoint’s wire contract and runtime rules in one Go definition. Your handler receives accepted input, returns a response, and leaves HTTP policy to the runtime.

Run your first endpoint

Install the module and serve a typed JSON endpoint locally.

Understand the model

Put parsing, runtime policy, business work, and response shaping in the right layers.

Design request contracts

Turn incoming JSON into complete Go values without a second validation pass.

Publish OpenAPI

Transcribe the contracts mounted by the running service.

What you define once

An endpoint can carry its method and route, request parser, response shapes, caller access, authorization mode, idempotency, request limits, timeouts, and operation metadata. HTTPAPI uses that definition to:
  • reject unacceptable requests before the handler runs;
  • expose only response fields available to the active caller;
  • record a consistent completion outcome; and
  • transcribe the mounted API without a second handwritten schema.

What stays in your service

Your application still owns identity verification, domain authorization, databases, transactions, business workflows, observability backends, and deployment. HTTPAPI provides explicit interfaces where those systems meet the HTTP boundary.
These guides document the Go reference implementation. The HTTPAPI 0.2 specification defines portable observable behavior and is authoritative for conformance.

Choose your next step