Skip to content

Add files to Swagger-UI Docker container to modify logo and topbar colors / rebranding #8604

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

Open
sspieker-cc opened this issue Apr 28, 2023 · 1 comment

Comments

@sspieker-cc
Copy link

  • OS: Docker [MacOS]
  • Browser: Any
  • Version: N/A
  • Method of installation: Docker build using swaggerapi/swagger-ui as the base image
  • Swagger-UI version: Latest
  • Swagger/OpenAPI version: N/A

Content & configuration

I have a directory that is being mounted into the Swagger-UI docker container that is hosted in a Kubernetes cluster. This container is intended to allow users to navigate through our catalog of services. Rebranding (logo and color changes) as well as a CSS menu bar need to be added to the topbar.

I am attempting to 'override' the default behavior of the SwaggerUI java script in order to provide the rebranding that is desired. There are multiple resources (mostly solutions for older versions of SwaggerUI in general and using the repository to build the solution overall.

Similar questions have been posed in the past but the results are somewhat vague in WHERE exactly to make the suggested changes and more specifically what process(es) are actually supported in order accomplish the solution. Much of the documentation assumes that there is already a fairly in-depth understanding of React / Express and/or the Swagger-UI project in general. Unfortunately I am failing to identify where I can apply the final suggestion in the following issue:

#4390

  1. It is possible to have these changes in a file that gets added to the docker container to override the default file(s)?
  2. If it is NOT possible, what is the process necessary to perform such an update?
  3. I understand that the swagger-ui build process will generate a new docker container with any customizations that I apply to the project, this may be an option for me but I prefer option Added regex to replace / with _ in resource name #1 as it is far easier to maintain going forward and keeps a clear separation of Swagger-UI code from that which is custom for our usage.

Thank you very much in advance, this information will be very much appreciated. Perhaps the responses might be added to the documentation as well with some concrete examples to show how to go about these tasks for other developers new to the Javascript / React / Express world.

@sspieker-cc
Copy link
Author

The github markup handler had assumed that I was referring to issue number 1 for swagger-ui, but in this case I am referring to option number 1 in my list above. I would like to be able to maintain some customized files and have them overlay the distribution files.

Thank you again in advance.

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

No branches or pull requests

1 participant