Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

### Removed
- **Section-header / banner comment noise (~30 lines).** Cleared the empty-divider `// ──────────────────────────────────────────────────` separators in `DashboardMessagesController`, `DashboardAnalyticsController`, `DashboardEndpointController` (5 banners), and the `// ============================================================` banner pairs in `WebhookEngine.Sdk/Models.cs` (5 banners — Response envelope, Event Types, Endpoints, Messages, Common query parameters). All carried no `WHY` content; class names and IDE folding already cover navigation. Section-titled banners in test files (`// ── Read paths ──`, `// ── Plumbing ──`, etc.) are preserved as deliberate test-grouping markers.

### Changed
- **`PATCH /api/v1/portal/endpoints/{id}` replaces `PUT`.** Portal endpoint update was tagged `[HttpPut]` but its body semantics were partial-replace (every field optional, only non-null fields applied) — that is the contract for `PATCH`, not `PUT`. Switching the method aligns the wire surface with the actual behaviour and avoids confusing REST consumers that expect `PUT` to be full-replace. The route, request shape, and response shape are unchanged. Minor breaking change for any direct HTTP caller hitting this route; the embeddable `<EndpointManager />` component already uses the new method.
- **`POST /api/v1/dashboard/applications/{appId}/portal/disable` no longer wipes `AllowedPortalOriginsJson`.** Disable revokes the auth surface (`PortalSigningKey` + `PortalRotatedAt`) but preserves the operator-curated CORS allowlist so a re-enable doesn't lose origin configuration. To explicitly clear the allowlist, send `PUT /portal/origins` with `{"origins": []}`. The audit log entry's `before/after` snapshot still records the change accurately.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ ORDER BY 1
return Ok(ApiEnvelope.Success(HttpContext, new { buckets }));
}

// ──────────────────────────────────────────────────
// Helper
// ──────────────────────────────────────────────────

private static (DateTime StartTime, int IntervalMinutes) ParseTimelineParams(string period, string interval)
{
var startTime = period switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ public DashboardEndpointController(
_auditLogger = auditLogger;
}

// ──────────────────────────────────────────────────
// Endpoints (cross-app, for dashboard admin)
// ──────────────────────────────────────────────────

[HttpGet("endpoints")]
public async Task<IActionResult> ListEndpoints(
[FromQuery] Guid? appId,
Expand Down Expand Up @@ -364,10 +360,6 @@ public async Task<IActionResult> TestEndpoint(
return Ok(ApiEnvelope.Success(HttpContext, result));
}

// ──────────────────────────────────────────────────
// Payload Transformation
// ──────────────────────────────────────────────────

[HttpPost("transform/validate")]
public IActionResult ValidateTransform([FromBody] ValidateTransformRequest request)
{
Expand All @@ -381,10 +373,6 @@ public IActionResult ValidateTransform([FromBody] ValidateTransformRequest reque
}));
}

// ──────────────────────────────────────────────────
// Event Types
// ──────────────────────────────────────────────────

[HttpGet("event-types")]
public async Task<IActionResult> ListEventTypes(
[FromQuery] Guid appId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public DashboardMessagesController(
_messageQueue = messageQueue;
}

// ──────────────────────────────────────────────────
// Messages (cross-app, for dashboard admin)
// ──────────────────────────────────────────────────

[HttpGet("messages")]
public async Task<IActionResult> ListMessages(
[FromQuery] Guid? appId,
Expand Down
20 changes: 0 additions & 20 deletions src/WebhookEngine.Sdk/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

namespace WebhookEngine.Sdk;

// ============================================================
// Response envelope
// ============================================================

public class ApiResponse<T>
{
public T? Data { get; set; }
Expand Down Expand Up @@ -43,10 +39,6 @@ public class ApiErrorDetail
public string? Message { get; set; }
}

// ============================================================
// Event Types
// ============================================================

public class CreateEventTypeRequest
{
public string Name { get; set; } = string.Empty;
Expand All @@ -71,10 +63,6 @@ public class EventTypeResponse
public DateTime CreatedAt { get; set; }
}

// ============================================================
// Endpoints
// ============================================================

public class CreateEndpointRequest
{
public string Url { get; set; } = string.Empty;
Expand Down Expand Up @@ -121,10 +109,6 @@ public class EndpointStatsResponse
public double P95LatencyMs { get; set; }
}

// ============================================================
// Messages
// ============================================================

public class SendMessageRequest
{
public string EventType { get; set; } = string.Empty;
Expand Down Expand Up @@ -228,10 +212,6 @@ public class MessageAttemptResponse
public DateTime CreatedAt { get; set; }
}

// ============================================================
// Common query parameters
// ============================================================

public class ListOptions
{
public int Page { get; set; } = 1;
Expand Down
Loading