Documentation
¶
Overview ¶
Package adapters-nethttp demonstrates wiring the api/rest builder to a standard net/http server using the adapters/nethttp adapter.
1. Define codecs and build routes with api/rest (transport-agnostic). 2. Wire each RouteHandle to net/http with adapters/nethttp.Register. 3. Generate the OpenAPI 3.1 spec from the same builder.
Run with: go run ./examples/adapters-nethttp
Click to show internal directories.
Click to hide internal directories.