feat(api): add composite ogen handler for incremental operations
This commit is contained in:
1 parent
0f206bfc29
commit
b2f6e87bfe
6 files changed
+133
-6
No files matched your search
@@ -18,12 +18,17 @@ const (
|
||||
readinessPath = "/readyz"
|
||||
)
|
||||
|
||||
// NewRouter mounts the internal operational routes and the generated public API.
|
||||
// The generated server keeps ogen's default error handler, which answers
|
||||
// ht.ErrNotImplemented with HTTP 501; operations without a business
|
||||
// implementation in apiHandler rely on that mapping.
|
||||
func NewRouter(
|
||||
health *v1.HealthHandler,
|
||||
apiHandler apiadapter.Handler,
|
||||
collector httpmiddleware.RequestMetrics,
|
||||
logger *slog.Logger,
|
||||
) (http.Handler, error) {
|
||||
apiServer, err := apiadapter.NewServer(health)
|
||||
apiServer, err := apiadapter.NewServer(apiHandler)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("httpadapter.NewRouter - create API server: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user