You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that swagger UI is heavy in the final binary. I tried building without it and got the following results:
Swagger + WebUI
Swagger Only
WebUI Only
No User Interface
39M
33M (-17.9%)
28M (-28.2%)
21M(-46.1%)
I think most people would not use the Swagger UI functionality, and a nearly 30% decrease in binary size is worth doing from my point of view, this is substantial if it is running on a highly limited environment(like an OpenWrt router, etc.).
Changes Proposed
Add two build tags(nowebuinoswagger) to exclude Swagger UI and WebUI from builds.
Permit CORS to /swagger and redirect /docs/*any to the swagger UI hosted on gotify.net page with our custom URL to /swagger.
I discovered that swagger UI is heavy in the final binary. I tried building without it and got the following results:
I think most people would not use the Swagger UI functionality, and a nearly 30% decrease in binary size is worth doing from my point of view, this is substantial if it is running on a highly limited environment(like an OpenWrt router, etc.).
Changes Proposed
nowebui
noswagger
) to exclude Swagger UI and WebUI from builds./swagger
and redirect/docs/*any
to the swagger UI hosted ongotify.net
page with our custom URL to/swagger
.Example: eternal-flame-AD@47a37cd
The text was updated successfully, but these errors were encountered: