Skip to content

feat(api): expose server features endpoint for CIRA tab toggle#1032

Draft
madhavilosetty-intel wants to merge 1 commit into
mainfrom
feat/server-features-endpoint
Draft

feat(api): expose server features endpoint for CIRA tab toggle#1032
madhavilosetty-intel wants to merge 1 commit into
mainfrom
feat/server-features-endpoint

Conversation

@madhavilosetty-intel
Copy link
Copy Markdown
Contributor

Add GET /api/v1/server/features returning an extensible capabilities object so clients (e.g. the Sample Web UI) can adapt their UI to how Console was started. The first flag, ciraEnabled, is derived from the existing APP_DISABLE_CIRA setting and lets the UI show or hide the CIRA tab.

Updates the Gin handler, the Fuego/OpenAPI declaration, and the MPS Postman collection in lock-step.

Add GET /api/v1/server/features returning an extensible capabilities
object so clients (e.g. the Sample Web UI) can adapt their UI to how
Console was started. The first flag, ciraEnabled, is derived from the
existing APP_DISABLE_CIRA setting and lets the UI show or hide the CIRA
tab.

Updates the Gin handler, the Fuego/OpenAPI declaration, and the MPS
Postman collection in lock-step.
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

Adds a new protected v1 endpoint that exposes server capability flags so clients can conditionally enable UI features (initially, toggling the CIRA tab based on APP_DISABLE_CIRA).

Changes:

  • Introduces GET /api/v1/server/features in the Gin v1 router, returning { ciraEnabled: boolean }.
  • Adds the corresponding DTO (dto.ServerFeatures) and OpenAPI (Fuego) route declaration.
  • Updates the MPS Postman collection and adds a focused Gin handler test.

Reviewed changes

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

Show a summary per file
File Description
internal/entity/dto/v1/server.go Adds ServerFeatures DTO with ciraEnabled JSON field.
internal/controller/openapi/server.go Declares /api/v1/server/features in the OpenAPI (Fuego) adapter.
internal/controller/openapi/adapter.go Registers the new Server OpenAPI routes during spec generation.
internal/controller/httpapi/v1/server.go Implements the Gin handler returning ciraEnabled derived from config.
internal/controller/httpapi/v1/server_test.go Tests ciraEnabled behavior for both enabled/disabled cases.
internal/controller/httpapi/router.go Wires the new server routes into the protected /api/v1 group.
integration-test/collections/console_mps_apis.postman_collection.json Adds a “Get Server Features” request with basic response assertions.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.66%. Comparing base (f01cb2b) to head (a68895a).

Files with missing lines Patch % Lines
internal/controller/openapi/server.go 0.00% 9 Missing ⚠️
internal/controller/httpapi/router.go 0.00% 1 Missing ⚠️
internal/controller/openapi/adapter.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage   41.66%   41.66%           
=======================================
  Files         135      137    +2     
  Lines       12433    12452   +19     
=======================================
+ Hits         5180     5188    +8     
- Misses       6698     6709   +11     
  Partials      555      555           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@madhavilosetty-intel madhavilosetty-intel marked this pull request as draft June 1, 2026 22:53
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.

3 participants