lighter swagger-ui

This commit is contained in:
Mikaël Cluseau 2019-02-04 14:14:00 +11:00
parent 12cfc86560
commit 382b6d2559
5 changed files with 11 additions and 7 deletions

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/google/certificate-transparency-go v1.0.21 // indirect
github.com/json-iterator/go v1.1.5 // indirect
github.com/markbates/going v1.0.3 // indirect
github.com/mcluseau/go-swagger-ui v0.0.0-20190204030159-200d6ab398a9
github.com/mcluseau/go-swagger-ui v0.0.0-20190204031235-fc4ac9154422
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/oklog/ulid v1.3.1

2
go.sum
View File

@ -409,6 +409,8 @@ github.com/mcluseau/go-swagger-ui v0.0.0-20190204025501-38c0b18f1edd h1:knS7/g8f
github.com/mcluseau/go-swagger-ui v0.0.0-20190204025501-38c0b18f1edd/go.mod h1:OllM1HVcFzek2effrrgC8BLKfG73mSKfrh41kEuhvMk=
github.com/mcluseau/go-swagger-ui v0.0.0-20190204030159-200d6ab398a9 h1:pPFPrmHOzd64dzF8kONrA41LvwzOf94RSLUku3cWsto=
github.com/mcluseau/go-swagger-ui v0.0.0-20190204030159-200d6ab398a9/go.mod h1:OllM1HVcFzek2effrrgC8BLKfG73mSKfrh41kEuhvMk=
github.com/mcluseau/go-swagger-ui v0.0.0-20190204031235-fc4ac9154422 h1:LduQ+iywUCm8L3S4BGs775iJSsB83pLfxF4eOT8kw34=
github.com/mcluseau/go-swagger-ui v0.0.0-20190204031235-fc4ac9154422/go.mod h1:OllM1HVcFzek2effrrgC8BLKfG73mSKfrh41kEuhvMk=
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=

File diff suppressed because one or more lines are too long

View File

@ -12,4 +12,11 @@ set -ex
rm -fr swagger-ui/dist
tar zxvf swagger-ui/$file --strip-components=1 -C swagger-ui swagger-ui-$v/dist
# remove stack trace support (heavy)
rm swagger-ui/dist/*.map
# remove unused files
rm swagger-ui/dist/swagger-ui.js
# set a better default URL
sed -i -e '/url:/s,https://petstore.swagger.io/v2/swagger.json,/swagger.json,g' swagger-ui/dist/*

2
vendor/modules.txt vendored
View File

@ -63,7 +63,7 @@ github.com/json-iterator/go
github.com/mailru/easyjson/jlexer
github.com/mailru/easyjson/jwriter
github.com/mailru/easyjson/buffer
# github.com/mcluseau/go-swagger-ui v0.0.0-20190204030159-200d6ab398a9
# github.com/mcluseau/go-swagger-ui v0.0.0-20190204031235-fc4ac9154422
github.com/mcluseau/go-swagger-ui
# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
github.com/modern-go/concurrent