/docs does not work offline: allow a configurable swagger-ui asset URL
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- backend, documentation
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 16.1k
- Forks
- 894
- Merge medio
- 3 d 16 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de gotify/server
-
a:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
Session elevation duration is unbounded, and large values silently overflow to a past timestampPosiblemente ocupada @piyush295 la tomó hace 21 días. Abiertoa:bug
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
gotify/server#1051 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
a:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
gotify/server#1047 · 6 comentarios ·
Los mantenedores suelen responder en 2 días
-
a:feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
OIDC: Disallow changing admin permissions for oidc users when OIDC group mapping is configuredAbiertoa:feature
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de gotify/server
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
scaleway/scaleway-cli#6492 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
taskcluster/taskcluster#9284 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
oasdiff/oasdiff#1337 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
splunk/terraform-provider-splunk#256 · 1 comentario ·
Los mantenedores suelen responder en 1 día