Skip to content

Commit

Permalink
go cluster-metadata-service: Fix missing swagger files
Browse files Browse the repository at this point in the history
  • Loading branch information
XxRoloxX committed Dec 15, 2024
1 parent 8052d49 commit 04a56de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
4 changes: 0 additions & 4 deletions go/docker/cluster_metadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ USER appuser

COPY --from=build /bin/server /bin/

# Copy the openapi.yaml specification
COPY ./services/cluster_metadata/api /srv
COPY ./pkg/swagger/index.html /srv/swagger-ui.html

EXPOSE 9090

ENTRYPOINT [ "/bin/server" ]
17 changes: 3 additions & 14 deletions go/services/cluster_metadata/pkg/config/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ package config
import (
"context"
"fmt"
"net"
"net/http"
"os"

messagebroker "github.com/Magpie-Monitor/magpie-monitor/pkg/message-broker"
"github.com/Magpie-Monitor/magpie-monitor/pkg/mongodb"
"github.com/Magpie-Monitor/magpie-monitor/pkg/routing"
"github.com/Magpie-Monitor/magpie-monitor/pkg/swagger"
"github.com/Magpie-Monitor/magpie-monitor/pkg/tests"
"github.com/Magpie-Monitor/magpie-monitor/services/cluster_metadata/internal/database"
"github.com/Magpie-Monitor/magpie-monitor/services/cluster_metadata/internal/handlers"
Expand All @@ -20,6 +15,9 @@ import (
"go.uber.org/fx"
"go.uber.org/fx/fxevent"
"go.uber.org/zap"
"net"
"net/http"
"os"
)

type ServerParams struct {
Expand All @@ -28,7 +26,6 @@ type ServerParams struct {
Logger *zap.Logger
MetadataRouter *handlers.MetadataRouter
RootRouter *mux.Router
SwaggerRouter *swagger.SwaggerRouter
}

func NewHTTPServer(ServerParams ServerParams) *http.Server {
Expand Down Expand Up @@ -66,10 +63,6 @@ func init() {

routing.NewRootRouter,

swagger.NewSwaggerRouter,
swagger.NewSwaggerHandler,
swagger.ProvideSwaggerConfig(),

handlers.NewMetadataRouter,
handlers.NewMetadataHandler,

Expand Down Expand Up @@ -105,10 +98,6 @@ func init() {

routing.NewRootRouter,

swagger.NewSwaggerRouter,
swagger.NewSwaggerHandler,
swagger.ProvideSwaggerConfig(),

handlers.NewMetadataRouter,
handlers.NewMetadataHandler,

Expand Down

0 comments on commit 04a56de

Please sign in to comment.