inaka / cowboy_swagger

Swagger integration for Cowboy (built on trails)
http://inaka.net/blog/2015/08/19/cowboy-swagger/
Apache License 2.0
122 stars 58 forks source link

Bumps Swagger UI to 5.7.1 #158

Closed kamilwaz closed 1 year ago

kamilwaz commented 1 year ago

This PR bumps Swagger UI from 3.x to 5.7.1. The version currently in use is 3.52.0 which is quite old and has a couple security vulnerabilities.

elbrujohalcon commented 1 year ago

You have a new release with this in it, @kamilwaz : https://hex.pm/packages/cowboy_swagger/2.7.0

paulo-ferraz-oliveira commented 1 year ago

@kamilwaz, nice stuff.

Do you have any idea on how we could automate this? We could, at least, try to find a way to create an issue (or pull request) to update, and then I'd code a solution.

If it's not much trouble could you highlight the main steps you took below?

Thanks.

kamilwaz commented 1 year ago

I copied all files from the dist folder. I only had to update this line: https://github.com/inaka/cowboy_swagger/blob/574e3581c343a2ccf0be380be0f1844fef5dcd4e/priv/swagger/swagger-initializer.js#L6

I don't know what would be the best way to automate this. You could try to fetch swagger-ui with npm, but it seems like overkill for me. All installation methods are described here: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/installation.md.