Feature/readonly mode and basepath#3
Merged
Conversation
1. Enhanced UI: - Added namespace filtering with 'All Namespaces' option - Implemented real-time filtering in selection boxes - Improved service information display - Added side-by-side namespace and service selectors 2. Backend improvements: - Added JSON tags to APIMetadata struct - Removed debug logging - Fixed service name parsing for API loading - Improved error handling in spec fetching
1. Remove unnecessary service processing logs 2. Adjust log levels for better verbosity control: - Normal operation logs to V(1) - Detailed debug info to V(2) 3. Simplify log messages for better readability 4. Remove duplicate logging in service processing
There was a problem hiding this comment.
Pull Request Overview
This pull request adds readonly mode support and a configurable base path to the Swagger UI server while also introducing allowed HTTP methods for APIs collected by the operator. It includes comprehensive changes to the Swagger UI styling and server routing, updates the aggregator controller to incorporate new API metadata fields and allowed methods processing, and makes ancillary updates to build scripts, documentation, and module dependencies.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/swagger/swagger-ui/assets/custom.css | New CSS file with base styling and enhancements for Swagger UI |
| pkg/swagger/server.go | Adds base path logic, refactors file serving and API spec fetching, and improves CORS handling and logging |
| internal/controller/openapiaggregator_controller.go | Updates API URL construction and allowed methods processing; modifies logging verbosity and status update handling |
| go.mod | Removes unused dependencies |
| config/samples/.yaml, config/crd/bases/.yaml | Updates sample and CRD definitions to include allowedMethods configuration |
| README.md | Adds ingress/route instructions and development setup guidance |
| Makefile, .github/workflows/build.yml | Refines build, test, and release processes for multi-architecture support |
Comments suppressed due to low confidence (2)
pkg/swagger/server.go:223
- The endpoint routing has changed from '/swagger-specs/' to '/api/' for serving individual specs. Please confirm if this change is intentional to align with the new API design, as it may affect client integrations.
case strings.HasPrefix(path, "/api/"):
internal/controller/openapiaggregator_controller.go:159
- The URL construction now uses the service DNS (name.namespace.svc.cluster.local) instead of the ClusterIP. Confirm that this change is intended for your deployment scenarios, as it may affect API routing in certain environments.
URL: fmt.Sprintf("http://%s.%s.svc.cluster.local:%s%s", svc.Name, svc.Namespace, port, path),
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.
No description provided.