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.
This replaces the
js
andcss
assets with their gzipped versions. Unzipped one of thejs
files is 1.3M and this reduces it to around 300k.This is probably not the cleanest way to fix this as I just manually zipped the files and committed them. If the
swagger-ui-dist
package is updated in the future, then this would need to redone.A better fix could be to provide instructions on how to fetch
swagger-ui-dist
package in your asset pipeline and then be able to pass a function that would calculate the path to the static assets that is used in the template. If using Phoenix you would pass something likeMyEndpoint.static_path
.Although this would be cleaner it's a more complex setup for the user of the library and a bigger refactor.