mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-13 17:10:36 +00:00
Fixed linting
This commit is contained in:
parent
d188f49126
commit
23e2db1496
@ -1,11 +1,12 @@
|
|||||||
package openapi
|
package openapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/bitechdev/ResolveSpec/pkg/modelregistry"
|
|
||||||
"github.com/bitechdev/ResolveSpec/pkg/restheadspec"
|
|
||||||
"github.com/bitechdev/ResolveSpec/pkg/resolvespec"
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
|
"github.com/bitechdev/ResolveSpec/pkg/modelregistry"
|
||||||
|
"github.com/bitechdev/ResolveSpec/pkg/resolvespec"
|
||||||
|
"github.com/bitechdev/ResolveSpec/pkg/restheadspec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExampleRestheadSpec shows how to configure OpenAPI generation for RestheadSpec
|
// ExampleRestheadSpec shows how to configure OpenAPI generation for RestheadSpec
|
||||||
|
|||||||
@ -1464,7 +1464,10 @@ func (h *Handler) HandleOpenAPI(w common.ResponseWriter, r common.Request) {
|
|||||||
|
|
||||||
w.SetHeader("Content-Type", "application/json")
|
w.SetHeader("Content-Type", "application/json")
|
||||||
w.WriteHeader(http.StatusOK)
|
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
|
// SetOpenAPIGenerator sets the OpenAPI generator function
|
||||||
|
|||||||
@ -2413,7 +2413,10 @@ func (h *Handler) HandleOpenAPI(w common.ResponseWriter, r common.Request) {
|
|||||||
|
|
||||||
w.SetHeader("Content-Type", "application/json")
|
w.SetHeader("Content-Type", "application/json")
|
||||||
w.WriteHeader(http.StatusOK)
|
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
|
// SetOpenAPIGenerator sets the OpenAPI generator function
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user