swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.66k stars 8.97k forks source link

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

Open sspieker-cc opened 1 year ago

sspieker-cc commented 1 year ago

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:

https://github.com/swagger-api/swagger-ui/issues/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 #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 commented 1 year ago

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.