in internal/pkg/core/deployers/deployers.go [128:146]
func (d *Deployer) DeployAPIs(ctx context.Context, fileName string, xmlData string) {
position := artifacts.Position{FileName: fileName}
api := types.API{}
newApi, err := api.Unmarshal(xmlData, position)
if err != nil {
d.logger.Error("Error unmarshalling api:", "error", err)
return
}
configContext := ctx.Value(utils.ConfigContextKey).(*artifacts.ConfigContext)
configContext.AddAPI(newApi)
d.logger.Info("Deployed API: " + newApi.Name)
// Register the API with the router service
if err := d.routerService.RegisterAPI(ctx, newApi); err != nil {
d.logger.Error("Error registering API with router service:", "error", err)
return
}
}