Skip to content

Conversation

@chazsconi
Copy link

This replaces the js and css assets with their gzipped versions. Unzipped one of the js 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 like MyEndpoint.static_path.

Although this would be cleaner it's a more complex setup for the user of the library and a bigger refactor.

maysam added a commit to maysam/phoenix_swagger that referenced this pull request Oct 8, 2024
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.

1 participant