mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-30 16:24:26 +00:00
Fixed linting
This commit is contained in:
@@ -22,12 +22,12 @@ type FallbackHandler func(w common.ResponseWriter, r common.Request, params map[
|
||||
|
||||
// Handler handles API requests using database and model abstractions
|
||||
type Handler struct {
|
||||
db common.Database
|
||||
registry common.ModelRegistry
|
||||
nestedProcessor *common.NestedCUDProcessor
|
||||
hooks *HookRegistry
|
||||
fallbackHandler FallbackHandler
|
||||
openAPIGenerator func() (string, error)
|
||||
db common.Database
|
||||
registry common.ModelRegistry
|
||||
nestedProcessor *common.NestedCUDProcessor
|
||||
hooks *HookRegistry
|
||||
fallbackHandler FallbackHandler
|
||||
openAPIGenerator func() (string, error)
|
||||
}
|
||||
|
||||
// NewHandler creates a new API handler with database and registry abstractions
|
||||
@@ -1464,7 +1464,10 @@ func (h *Handler) HandleOpenAPI(w common.ResponseWriter, r common.Request) {
|
||||
|
||||
w.SetHeader("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte(spec))
|
||||
_, err = w.Write([]byte(spec))
|
||||
if err != nil {
|
||||
logger.Error("Error sending OpenAPI spec response: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// SetOpenAPIGenerator sets the OpenAPI generator function
|
||||
|
||||
Reference in New Issue
Block a user