Make swagger scheme dropdown have the website's protocol selected #3203

Closed
opened 2025-11-02 05:03:47 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @richmahn on GitHub (Apr 16, 2019).

A little annoyance that my team has in using a website with HTTPS is that the /api/swagger page always has the 'schemes' selection default to HTTP, so when we point someone to that page (or they link from our Gitea instance's footer) it doesn't work for them, they complain, we tell them to set HTTPS, etc. Always have to remember to set that when you go to that page.

It looks like you can do a little change in ui.tmpl to change the JSON payload to the swagger library before it is called: https://gist.github.com/miguelmota/289643541cf55825f14d2ea66598bf64

Plan to implement this.

Originally created by @richmahn on GitHub (Apr 16, 2019). A little annoyance that my team has in using a website with HTTPS is that the /api/swagger page always has the 'schemes' selection default to HTTP, so when we point someone to that page (or they link from our Gitea instance's footer) it doesn't work for them, they complain, we tell them to set HTTPS, etc. Always have to remember to set that when you go to that page. It looks like you can do a little change in ui.tmpl to change the JSON payload to the swagger library before it is called: https://gist.github.com/miguelmota/289643541cf55825f14d2ea66598bf64 Plan to implement this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3203