Skip to content

Commit f00961a

Browse files
silverwindtechknowlogick
authored andcommitted
move swagger-ui to webpack/npm (#9714)
Created a second webpack output file for swagger-ui which is loaded on the /api/swagger route. One notable difference is the absence of the swagger favicon that was previously used which is now the gitea icon. I see no easy way to restore that favicon, so I decided to not keep it.
1 parent 44de66b commit f00961a

19 files changed

+875
-462
lines changed

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -487,14 +487,6 @@ $(CSS_DEST): node_modules $(CSS_SOURCES)
487487
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
488488
npx postcss --use autoprefixer --use cssnano --no-map --replace public/css/*
489489

490-
.PHONY: swagger-ui
491-
swagger-ui:
492-
rm -Rf public/vendor/assets/swagger-ui
493-
git clone --depth=10 -b v3.13.4 --single-branch https://github.com/swagger-api/swagger-ui.git $(TMPDIR)/swagger-ui
494-
mv $(TMPDIR)/swagger-ui/dist public/vendor/assets/swagger-ui
495-
rm -Rf $(TMPDIR)/swagger-ui
496-
$(SED_INPLACE) "s;http://petstore.swagger.io/v2/swagger.json;../../../swagger.v1.json;g" public/vendor/assets/swagger-ui/index.html
497-
498490
.PHONY: update-translations
499491
update-translations:
500492
mkdir -p ./translations

0 commit comments

Comments
 (0)