Option to configure Plugins and Presets via Docker Env Variables #10629
+10
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Option to configure Plugins and Presets via Docker Env Variables
Description
This change allows customization of the swagger-ui image without having to reimplement the templating logic for the swagger constructor.
This change just connects the already implemented functionality to docker environment variables.
Motivation and Context
A good example why this is needed, is customizing the logo via plugin as described here.
While the script defining the plugin can be loaded using a custom
index.html, acustom swagger-initializer.js``would either be overwritten or not be templated at all.The
LAYOUTparameter is not included in this PR, as it is already implemented in the same way, but simply missing from the documentation (See #10029).How Has This Been Tested?
The change was tested by running the adjusted Dockerfile with different values for said environment variables (including omitting them).
It was also tested with a custom image with a custom logo, as mentioned above.
Checklist
My PR contains...
src/is unmodified: changes to documentation, CI, metadata, etc.)package.json)My changes...
Documentation
Automated tests