search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using static StellaOps.Localization.T;
|
||||
using StellaOps.Auth.ServerIntegration.Tenancy;
|
||||
using StellaOps.Integrations.Contracts;
|
||||
using StellaOps.Integrations.Contracts.AiCodeGuard;
|
||||
@@ -31,7 +32,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Operate)
|
||||
.WithName("RunAiCodeGuard")
|
||||
.WithDescription("Executes a standalone AI Code Guard analysis pipeline against the specified target, equivalent to running `stella guard run`. Returns the scan result including detected issues, severity breakdown, and any policy violations.");
|
||||
.WithDescription(_t("integrations.ai_code_guard.run_description"));
|
||||
|
||||
// List integrations
|
||||
group.MapGet("/", async (
|
||||
@@ -53,7 +54,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Read)
|
||||
.WithName("ListIntegrations")
|
||||
.WithDescription("Returns a paginated list of integrations optionally filtered by type, provider, status, or a free-text search term. Results are sorted by the specified field and direction, defaulting to name ascending.");
|
||||
.WithDescription(_t("integrations.integration.list_description"));
|
||||
|
||||
// Get integration by ID
|
||||
group.MapGet("/{id:guid}", async (
|
||||
@@ -66,7 +67,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Read)
|
||||
.WithName("GetIntegration")
|
||||
.WithDescription("Returns the full integration record for the specified ID including provider, type, configuration metadata, and current status. Returns 404 if the ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.get_description"));
|
||||
|
||||
// Create integration
|
||||
group.MapPost("/", async (
|
||||
@@ -80,7 +81,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Write)
|
||||
.WithName("CreateIntegration")
|
||||
.WithDescription("Registers a new integration with the catalog. The provider plugin is loaded and validated during creation. Returns 201 Created with the new integration record. Returns 400 if the provider is unsupported or required configuration is missing.");
|
||||
.WithDescription(_t("integrations.integration.create_description"));
|
||||
|
||||
// Update integration
|
||||
group.MapPut("/{id:guid}", async (
|
||||
@@ -95,7 +96,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Write)
|
||||
.WithName("UpdateIntegration")
|
||||
.WithDescription("Updates the mutable configuration of an existing integration including display name, credentials reference, and provider-specific settings. Returns the updated integration record. Returns 404 if the ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.update_description"));
|
||||
|
||||
// Delete integration
|
||||
group.MapDelete("/{id:guid}", async (
|
||||
@@ -109,7 +110,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Write)
|
||||
.WithName("DeleteIntegration")
|
||||
.WithDescription("Soft-deletes an integration from the catalog, disabling it without removing audit history. Returns 204 No Content on success. Returns 404 if the ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.delete_description"));
|
||||
|
||||
// Test connection
|
||||
group.MapPost("/{id:guid}/test", async (
|
||||
@@ -123,7 +124,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Operate)
|
||||
.WithName("TestIntegrationConnection")
|
||||
.WithDescription("Executes a live connectivity and authentication test against the external system for the specified integration. Returns a test result object with success status, latency, and any error details. Returns 404 if the integration ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.test_description"));
|
||||
|
||||
// Health check
|
||||
group.MapGet("/{id:guid}/health", async (
|
||||
@@ -136,7 +137,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Read)
|
||||
.WithName("CheckIntegrationHealth")
|
||||
.WithDescription("Performs a health check on the specified integration and returns the current health status, including reachability, authentication validity, and any degradation indicators. Returns 404 if the integration ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.health_description"));
|
||||
|
||||
// Impact map
|
||||
group.MapGet("/{id:guid}/impact", async (
|
||||
@@ -149,7 +150,7 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Read)
|
||||
.WithName("GetIntegrationImpact")
|
||||
.WithDescription("Returns an impact map for the specified integration showing which workflows, pipelines, and policy gates depend on it, grouped by severity. Use this before disabling or reconfiguring an integration to understand downstream effects. Returns 404 if the ID is not found.");
|
||||
.WithDescription(_t("integrations.integration.impact_description"));
|
||||
|
||||
// Get supported providers
|
||||
group.MapGet("/providers", ([FromServices] IntegrationService service) =>
|
||||
@@ -159,6 +160,6 @@ public static class IntegrationEndpoints
|
||||
})
|
||||
.RequireAuthorization(IntegrationPolicies.Read)
|
||||
.WithName("GetSupportedProviders")
|
||||
.WithDescription("Returns the list of integration provider types currently supported by the loaded plugin set. Use this to discover valid provider values before creating a new integration.");
|
||||
.WithDescription(_t("integrations.integration.get_providers_description"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using StellaOps.Integrations.WebService.Infrastructure;
|
||||
using StellaOps.Integrations.WebService.Security;
|
||||
|
||||
using StellaOps.Auth.ServerIntegration.Tenancy;
|
||||
using StellaOps.Localization;
|
||||
using StellaOps.Router.AspNet;
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -72,6 +73,8 @@ builder.Services.AddSingleton<IAiCodeGuardPipelineConfigLoader, AiCodeGuardPipel
|
||||
builder.Services.AddScoped<IAiCodeGuardRunService, AiCodeGuardRunService>();
|
||||
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
builder.Services.AddStellaOpsLocalization(builder.Configuration);
|
||||
builder.Services.AddTranslationBundle(System.Reflection.Assembly.GetExecutingAssembly());
|
||||
|
||||
// Authentication and authorization
|
||||
builder.Services.AddStellaOpsResourceServerAuthentication(builder.Configuration);
|
||||
@@ -101,6 +104,7 @@ if (app.Environment.IsDevelopment())
|
||||
}
|
||||
|
||||
app.UseStellaOpsCors();
|
||||
app.UseStellaOpsLocalization();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseStellaOpsTenantMiddleware();
|
||||
@@ -125,6 +129,7 @@ if (app.Environment.IsDevelopment())
|
||||
}
|
||||
|
||||
app.TryRefreshStellaRouterEndpoints(routerEnabled);
|
||||
await app.LoadTranslationsAsync();
|
||||
app.Run();
|
||||
|
||||
public partial class Program { }
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Plugin\StellaOps.Plugin.csproj" />
|
||||
<ProjectReference Include="..\..\Router\__Libraries\StellaOps.Messaging\StellaOps.Messaging.csproj" />
|
||||
<ProjectReference Include="..\..\Authority\StellaOps.Authority\StellaOps.Auth.ServerIntegration\StellaOps.Auth.ServerIntegration.csproj" />
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Localization\StellaOps.Localization.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Translations\*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"_meta": { "locale": "en-US", "namespace": "integrations", "version": "1.0" },
|
||||
|
||||
"integrations.ai_code_guard.run_description": "Executes a standalone AI Code Guard analysis pipeline against the specified target, equivalent to running `stella guard run`. Returns the scan result including detected issues, severity breakdown, and any policy violations.",
|
||||
"integrations.integration.list_description": "Returns a paginated list of integrations optionally filtered by type, provider, status, or a free-text search term. Results are sorted by the specified field and direction, defaulting to name ascending.",
|
||||
"integrations.integration.get_description": "Returns the full integration record for the specified ID including provider, type, configuration metadata, and current status. Returns 404 if the ID is not found.",
|
||||
"integrations.integration.create_description": "Registers a new integration with the catalog. The provider plugin is loaded and validated during creation. Returns 201 Created with the new integration record. Returns 400 if the provider is unsupported or required configuration is missing.",
|
||||
"integrations.integration.update_description": "Updates the mutable configuration of an existing integration including display name, credentials reference, and provider-specific settings. Returns the updated integration record. Returns 404 if the ID is not found.",
|
||||
"integrations.integration.delete_description": "Soft-deletes an integration from the catalog, disabling it without removing audit history. Returns 204 No Content on success. Returns 404 if the ID is not found.",
|
||||
"integrations.integration.test_description": "Executes a live connectivity and authentication test against the external system for the specified integration. Returns a test result object with success status, latency, and any error details. Returns 404 if the integration ID is not found.",
|
||||
"integrations.integration.health_description": "Performs a health check on the specified integration and returns the current health status, including reachability, authentication validity, and any degradation indicators. Returns 404 if the integration ID is not found.",
|
||||
"integrations.integration.impact_description": "Returns an impact map for the specified integration showing which workflows, pipelines, and policy gates depend on it, grouped by severity. Use this before disabling or reconfiguring an integration to understand downstream effects. Returns 404 if the ID is not found.",
|
||||
"integrations.integration.get_providers_description": "Returns the list of integration provider types currently supported by the loaded plugin set. Use this to discover valid provider values before creating a new integration."
|
||||
}
|
||||
Reference in New Issue
Block a user