From 0733bb12e3903434906c09dfb01e877dcac5b5a4 Mon Sep 17 00:00:00 2001 From: Logan Cunningham <148146808+loganwc@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:13:10 -0500 Subject: [PATCH] Revert "B 20997 add pptas under prime simulator" --- pkg/handlers/routing/routing_init.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/pkg/handlers/routing/routing_init.go b/pkg/handlers/routing/routing_init.go index 223b54e4122..7a61fa3ccf3 100644 --- a/pkg/handlers/routing/routing_init.go +++ b/pkg/handlers/routing/routing_init.go @@ -602,30 +602,6 @@ func mountPrimeSimulatorAPI(appCtx appcontext.AppContext, routingConfig *Config, rAuth.Mount("/", api.Serve(tracingMiddleware)) }) }) - site.Route("/pptas/v1", func(r chi.Router) { - r.Method("GET", "/swagger.yaml", - handlers.NewFileHandler(routingConfig.FileSystem, - routingConfig.PPTASSwaggerPath)) - if routingConfig.ServeSwaggerUI { - appCtx.Logger().Info("PPTAS Simulator API Swagger UI serving is enabled") - r.Method("GET", "/docs", - handlers.NewFileHandler(routingConfig.FileSystem, - path.Join(routingConfig.BuildRoot, "swagger-ui", "pptas.html"))) - } else { - r.Method("GET", "/docs", http.NotFoundHandler()) - } - - // Mux for prime simulator API that enforces auth - r.Route("/", func(rAuth chi.Router) { - rAuth.Use(userAuthMiddleware) - rAuth.Use(addAuditUserToRequestContextMiddleware) - rAuth.Use(authentication.PrimeSimulatorAuthorizationMiddleware(appCtx.Logger())) - rAuth.Use(middleware.NoCache()) - api := pptasapi.NewPPTASAPI(routingConfig.HandlerConfig) - tracingMiddleware := middleware.OpenAPITracing(api) - rAuth.Mount("/", api.Serve(tracingMiddleware)) - }) - }) // Support API serves to support Prime API testing outside of production environments, hence why it is // mounted inside the Prime sim API without client cert middleware if routingConfig.ServeSupport {