Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample for BFF with openapi #232

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Add sample for BFF with openapi #232

wants to merge 15 commits into from

Conversation

Erwinvandervalk
Copy link
Contributor

@Erwinvandervalk Erwinvandervalk commented Mar 21, 2025

Adds a sample for how to use the BFF with OpenAPI:

  1. proxying OpenAPI documents and showing via swaggerui
  2. authenticating swaggerUI with bff
  3. transforming the openapi docs to comply with bff
  4. command line generation
  5. combining multiple openapi docs to a single one.

Erwinvandervalk and others added 13 commits March 20, 2025 14:02
Changed relative Swagger endpoint paths to absolute ones for consistency and to prevent potential issues with path resolution. This ensures the Swagger UI functions correctly in all deployment environments.
@Erwinvandervalk Erwinvandervalk marked this pull request as ready for review March 24, 2025 08:55
Refactor logic to dynamically add authentication buttons only when not already present. Introduce a more reliable method to detect and handle the rendering of the Swagger UI elements using MutationObserver with additional safeguards. This ensures improved performance and stability in handling authentication states.
Copy link
Collaborator

@khalidabuhakmeh khalidabuhakmeh left a comment

Choose a reason for hiding this comment

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

@Erwinvandervalk It looks good. I made two fixes:

  • The JavaScript now works across service changes (need to revisit in the future with Swagger plugins)
  • Fixed double registration of API1 in the dropdown.

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