Skip to content

Conversation

@desaiuditd
Copy link
Contributor

Description

When we add SWAGGER_JSON file to Docker container, it simply copies the JSON file into /usr/share/nginx/html. So the JSON shows proper content for the first.

If we make changes to the local JSON file while the Docker container is running, it will not take the live changes. We will need to restart the container in order to see the changes again.

Creating a symbolic link instead of copying the file can be a better option to solve this issue.

Motivation and Context

  • Why is this change required? What problem does it solve?
    • To see the live changes from the local JSON file into swagger-ui.

How Has This Been Tested?

  • Please describe in detail how you manually tested your changes.
    • docker build . command created the new docker image successfully, after this change.
    • Executed swagger-ui with this newly created image. And it worked correctly.
    • The swagger-ui reflected live changes from the JSON file properly, without restarting the docker container.
  • Include details of your testing environment, and the tests you ran to
    • Tested this change on MacOS.
  • see how your change affects other areas of the code, etc.
    • None

Screenshots (if appropriate):

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@shockey shockey self-assigned this Dec 13, 2017
@shockey shockey self-requested a review December 13, 2017 00:29
@dhui
Copy link

dhui commented Jan 6, 2018

Any idea when this will be merged and "deployed" to the docker registry?
cp -s should work in BusyBox: https://busybox.net/downloads/BusyBox.html#cp

@shockey
Copy link
Contributor

shockey commented Jan 6, 2018

@dhui no promises on a go-live date, but I'll put this on my list to review in the coming week!

@shockey shockey added this to the January 12, 2018 milestone Jan 6, 2018
@shockey shockey merged commit a037c72 into swagger-api:master Jan 11, 2018
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

Successfully merging this pull request may close these issues.

3 participants