swagger-api / swagger-api/swagger-ui
Add files to Swagger-UI Docker container to modify logo and topbar colors / rebranding
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
- 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:
https://github.com/swagger-api/swagger-ui/issues/4390
- It is possible to have these changes in a file that gets added to the docker container to override the default file(s)?
- If it is NOT possible, what is the process necessary to perform such an update?
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing issue #4390, the Swagger-UI JavaScript customization approach, and the Docker build process mentioned here. Determine which supported path answers the three questions about mounted files versus a rebuilt container, then document concrete examples for logo, topbar colors, and CSS menu customization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, express, javascript, react
- Domain
- devops, documentation, frontend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100