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

feature: full-spectrum runtime Docker configuration #4965

Merged
merged 13 commits into from
Nov 1, 2018

Conversation

shockey
Copy link
Contributor

@shockey shockey commented Oct 24, 2018

Description

This PR overhauls our Docker image's method of injecting configuration values into Swagger UI.

Broadly, it solves the following problems:

  • Many configuration variables were not exposed through the old method
  • Our old method of injection was not idempotent - multiple runs of the image could break things
  • Our sed approach of editing things on the fly was difficult to test

It introduces the following new environment variables:

  • CONFIG_URL
  • DEEP_LINKING
  • DEFAULT_MODEL_EXPAND_DEPTH
  • DEFAULT_MODEL_RENDERING
  • DEFAULT_MODELS_EXPAND_DEPTH
  • DISPLAY_OPERATION_ID
  • DISPLAY_REQUEST_DURATION
  • DOC_EXPANSION
  • DOM_ID
  • FILTER
  • LAYOUT
  • MAX_DISPLAYED_TAGS
  • OAUTH2_REDIRECT_URL
  • SHOW_COMMON_EXTENSIONS
  • SHOW_EXTENSIONS
  • SHOW_MUTATED_REQUEST
  • SPEC
  • SUPPORTED_SUBMIT_METHODS
  • URL
  • URLS_PRIMARY_NAME
  • URLS
  • VALIDATOR_URL

It deprecates the following existing environment variables, which will continue to work until v4.0:

  • API_URL
  • API_URLS

Motivation and Context

How Has This Been Tested?

I added unit tests for the config object generator, and manually tested functionality with a local Docker image.

Screenshots (if appropriate):

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@shockey shockey force-pushed the docker-configuration branch from b96099b to 9ae643f Compare October 24, 2018 21:25
@shockey
Copy link
Contributor Author

shockey commented Oct 25, 2018

please build

@shockey shockey merged commit 31a8b13 into master Nov 1, 2018
@shockey shockey deleted the docker-configuration branch November 26, 2018 14:16
@yscialom
Copy link

yscialom commented May 22, 2020

This feature is not availble anymore as of v3.24.2.

@ScepticMatt
Copy link

Is there a replacement for OAUTH2_REDIRECT_URL env for swagger 5?

JuanSW18 pushed a commit to Digital-Paw/digital-paw-swagger-ui that referenced this pull request Aug 23, 2024
…4965)

* reorganize docker things

* Configurator WIP

* implement Docker runtime config generator

* add tests

* update documentation

* fix Markdown tables

* Move Docker section

* add note to README

* move up `nodejs` install for more aggressive caching

* drop exclusive test

* fix missing `DISPLAY_OPERATION_ID`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants