/docs does not work offline: allow a configurable swagger-ui asset URL
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- backend, documentation
Direzione di ricerca
Start in docs/ui.go and inspect how configuration fields are defined and exposed through config.yml. Add the optional Swagger UI asset URL while preserving the current cdnjs default and integrity hashes, then verify that /docs uses the configured base URL and retains the existing default behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Split out of #1053. That issue is now SRI and version only, fixed by #1060.
/docs loads swagger-ui's CSS and JS from cdnjs. On an air-gapped or LAN-only install the page stays blank. The rest of the web UI is embedded with go:embed, so /docs is the only page that needs internet access.
Bundling swagger-ui-dist was turned down in #114 because of binary size (about 1.5 MB gzipped), and so were build tags. This proposal needs neither.
Proposal: an optional setting for where /docs loads the swagger-ui assets from, e.g. GOTIFY_SERVER_SWAGGERUIURL / server.swaggeruiurl in config.yml. It defaults to the current cdnjs path. docs/ui.go would put the setting in front of the three filenames and keep the same integrity hashes. A local mirror would then have to serve byte-identical files for the pinned version, so a changed or wrong-version mirror fails closed rather than running in the app origin.
- No change to binary size or default behaviour.
- An offline user runs something like
npm pack swagger-ui-dist@<pinned>once, hosts the three files on any internal static server (or a reverse proxy path) and sets the URL. - About ten lines in
docs/ui.goplus a config field.
Workaround until then: /swagger still serves the spec JSON, so an offline Swagger/OpenAPI viewer can load it directly.
If you're open to it I can send the PR or just close this if its still off the table.
- Lingua principale
- Go
- Stelle
- 16.1k
- Fork
- 894
- Merge medio
- 3g 16h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di gotify/server
-
a:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
Session elevation duration is unbounded, and large values silently overflow to a past timestampForse già presa @piyush295 l’ha presa 21 giorni fa. Apertaa:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
gotify/server#1051 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
a:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
gotify/server#1047 · 6 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
a:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
OIDC: Disallow changing admin permissions for oidc users when OIDC group mapping is configuredApertaa:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di gotify/server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
blinklabs-io/dingo#5368 ·
I maintainer di solito rispondono entro 1 giorno
-
difficulty: easy enhancement frontend good first issue help wanted priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rafaelsilvabr/pdfHandler#18 ·
-
Difficoltà 2/5 1-2 giorni Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno