Skip to content

Feature/readonly mode and basepath#3

Merged
hellices merged 27 commits into
mainfrom
feature/readonly-mode-and-basepath
Jun 2, 2025
Merged

Feature/readonly mode and basepath#3
hellices merged 27 commits into
mainfrom
feature/readonly-mode-and-basepath

Conversation

@hellices

Copy link
Copy Markdown
Owner

No description provided.

hellices added 11 commits May 31, 2025 22:33
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
@hellices hellices requested a review from Copilot June 2, 2025 01:25

Copilot AI left a comment

Copy link
Copy Markdown

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 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),

@hellices hellices merged commit 75092f6 into main Jun 2, 2025
2 checks passed
@hellices hellices deleted the feature/readonly-mode-and-basepath branch June 2, 2025 05:28
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