Skip to content

Update aggregator api#4

Merged
SRodi merged 11 commits into
mainfrom
update-aggregator-api
Aug 14, 2025
Merged

Update aggregator api#4
SRodi merged 11 commits into
mainfrom
update-aggregator-api

Conversation

@SRodi
Copy link
Copy Markdown
Owner

@SRodi SRodi commented Aug 13, 2025

This pull request introduces new API endpoints for the aggregator and significantly improves the API documentation by providing detailed schema definitions for responses and filters. These changes make the API easier to use and understand for both developers and consumers. The documentation now includes explicit models for event filtering, health checks, and eBPF program information, replacing previously generic object schemas.

API Endpoint Additions

  • Added new aggregator-specific endpoints in cmd/aggregator/main.go for listing connections, packet drops, and providing summaries, as well as an endpoint for listing eBPF programs.

API Documentation Improvements

  • Updated Swagger/OpenAPI documentation (docs/swagger-aggregator/docs.go, .json, .yaml) to use explicit response schemas (api.EventsResponse, api.ProgramsResponse, api.HealthResponse) instead of generic objects for several endpoints. This clarifies the structure of API responses. [1] [2] [3] [4] [5] [6] [7]

  • Added detailed schema definitions for event filters (api.EventFilters), event responses (api.EventsResponse), health responses (api.HealthResponse), eBPF program information (api.ProgramInfo), and program list responses (api.ProgramsResponse) in the documentation files. [1] [2] [3] [4] [5] [6]

Documentation Reference Updates

  • Updated the README to provide a direct link to the API aggregator documentation for Kubernetes deployments.

  • Removed the contact URL from the API documentation and changed the description to include endpoint success annotations, likely for improved Swagger rendering or code generation. [1] [2] [3] [4]

@SRodi SRodi requested a review from Copilot August 13, 2025 07:20

This comment was marked as outdated.

@SRodi SRodi requested a review from Copilot August 13, 2025 22:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the aggregator API by introducing structured response schemas and adding new aggregator-specific endpoints. The changes improve API documentation clarity by replacing generic object responses with explicit typed models for events, programs, and health checks. Key endpoints for connection and packet drop management are added to the aggregator service.

  • Structured response types replace generic objects for better API documentation
  • New aggregator endpoints for listing connections, packet drops, and summaries
  • Enhanced Swagger documentation with detailed schema definitions

Reviewed Changes

Copilot reviewed 11 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
internal/api/handlers.go Updates handlers to use structured response types and fixes comment positioning
internal/aggregator/aggregator.go Adds comprehensive aggregator-specific API handlers and response types
docs/swagger/. Updates Swagger documentation to use explicit response schemas instead of generic objects
docs/swagger-aggregator/. Updates aggregator-specific Swagger documentation with new schema definitions
cmd/aggregator/main.go Adds routing for new aggregator endpoints
README.md Adds link to aggregator API documentation
LICENSE Updates copyright holder name

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread internal/api/handlers.go Outdated
Comment thread internal/api/handlers.go Outdated
Comment thread internal/aggregator/aggregator.go
Comment thread internal/aggregator/aggregator.go Outdated
Comment thread internal/aggregator/aggregator.go Outdated
Comment thread internal/aggregator/aggregator.go Outdated
Comment thread internal/aggregator/aggregator.go Outdated
@SRodi SRodi merged commit a53f882 into main Aug 14, 2025
5 checks passed
@SRodi SRodi deleted the update-aggregator-api branch August 14, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants