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

spec-renderer and swagger-ui-web-component don't allow changing the theme #876

Open
vprakash-seatgeek opened this issue Oct 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@vprakash-seatgeek
Copy link

We've been trying to put a custom theme on top of the open-source dev portal. To render an OpenAPI spec, the portal relies on spec-renderer which in turn uses swagger-ui-web-component. However, swagger-ui-web-component hardcodes SwaggerUIKongTheme and KongLayout when providing a layout to SwaggerUI.

As it stands today, to customize the spec rendering in the open source portal you have two options:

  • Write your own spec rendering component from scratch, instantiate SwaggerUI directly, and provide a theme.
  • Fork this repo to change the dependencies in spec-renderer and swagger-ui-web-component.

Neither of these is ideal for us. Would it be possible to make the theme more configurable in this flow?

@nateslo
Copy link
Member

nateslo commented Dec 1, 2023

Hi @vprakash-seatgeek. Currently, the best approach is to fork spec-renderer and swagger-ui-web-component. I understand this is not an ideal development experience. We are still looking into a better solution and appreciate your feedback.

@nateslo nateslo added the enhancement New feature or request label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants