/docs does not work offline: allow a configurable swagger-ui asset URL
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- backend, documentation
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 16.1k
- フォーク
- 894
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gotify/server のほかの issue
-
a:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
Session elevation duration is unbounded, and large values silently overflow to a past timestamp対応中かも @piyush295 が 21 日前に担当しました。 オープンa:bug
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
gotify/server#1051 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
a:bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
gotify/server#1047 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
a:feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
a:feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
plugins: symlinked plugin directories are skipped対応中かも @lab1207 が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
eugenioenko/ttt#1029 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Edwin-metcalf/MetCode#24 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-operator
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
keyxmakerx/Chronicle#1654 ·
メンテナーはふだん 1 日以内に返信
-
area/security kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
agent-substrate/substrate#2935 ·
メンテナーはふだん 1 日以内に返信