Skip to content

Add sample for BFF with openapi#232

Merged
maartenba merged 15 commits intomainfrom
ev/bff/openapi
Apr 30, 2025
Merged

Add sample for BFF with openapi#232
maartenba merged 15 commits intomainfrom
ev/bff/openapi

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.

@maartenba maartenba merged commit a284114 into main Apr 30, 2025
3 checks passed
@maartenba maartenba deleted the ev/bff/openapi branch April 30, 2025 09:46
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

Comments