Update aggregator api#4
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cmd/aggregator/main.gofor 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]