Skip to content

Conversation

@Rupa-421
Copy link

@Rupa-421 Rupa-421 commented Jan 3, 2026

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)
This PR integrates Swagger UI into the application using springdoc-openapi and automates the API contract delivery.
Key changes include:
Version Catalog Migration: Moved springdoc and related dependencies to libs.versions.toml for centralized management.
Build Automation: Created a new Gradle task copyOpenApiSpecForSwagger that automatically pulls the latest OpenAPI YAML from the contract-typespec module and places it in the static web resources.
Security Configuration: Updated the Security Filter Chain to permit access to Swagger UI endpoints (/swagger-ui/, /v3/api-docs/, etc.).
Application Properties: Configured springdoc to point to the local static OpenAPI spec instead of the default generated one to ensure consistency with the TypeSpec definition.
Resource Management: Linked processResources to the spec-copying task to ensure the UI is always up-to-date during development and packaging.
Fixes #631

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually : Verified Swagger UI loads at /swagger-ui.html and correctly parses the kafbat-ui-api.yaml file. Verified that the static/openapi folder is correctly generated after a ./gradlew clean build.
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@Rupa-421 Rupa-421 requested a review from a team as a code owner January 3, 2026 08:21
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Jan 3, 2026
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi Rupa-421! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@Haarolean Haarolean added scope/backend Related to backend changes type/feature A brand new feature impact/api A PR with changes which affect API and removed status/triage/manual Manual triage in progress labels Jan 3, 2026
@Haarolean Haarolean added this to the 1.5 milestone Jan 3, 2026
@github-project-automation github-project-automation bot moved this to Changes requested in Release 1.5 Jan 3, 2026
@Rupa-421 Rupa-421 requested a review from a team as a code owner January 3, 2026 11:03
@Rupa-421
Copy link
Author

Rupa-421 commented Jan 3, 2026

I have updated the PR to disable Swagger UI by default. It can now be toggled via the AUTH_OPENAPI_ENABLED environment variable. I also added the documentation for this variable in the README.md

@Rupa-421 Rupa-421 requested a review from Haarolean January 5, 2026 14:11
@Haarolean
Copy link
Member

@Rupa-421 have you tried running this with any kind of auth enabled? login_form should work fine, but I fear oauth might be tricky here

@Rupa-421
Copy link
Author

@Haarolean ,I have tried with auth enabled for both the login form and also Github Oauth. They are working fine.
Screenshot (19)
Screenshot (32)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/api A PR with changes which affect API scope/backend Related to backend changes status/triage/completed Automatic triage completed type/feature A brand new feature

Projects

Status: Changes requested

Development

Successfully merging this pull request may close these issues.

Impl OpenAPI UI

2 participants