Move OpenAPI UI hosting into Toolkit while keeping generated specs inside modules
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 48/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- openapi, php
- 領域
- api, devtools, documentation
調査の方向性
src/Console/Commands/OpenApiCommand.php と src/Console/Commands/InstallToolkitCommand.php から始め、次に Toolkit のテンプレート、shared/views/openapi/openapi.php、public/assets/OpenApiUi、モジュールのリソース resources/openapi/spec.json を調べます。モジュールの Controllers/OpenApi/* が現在どのように公開されているかを追跡します。完了条件は、Toolkit が UI、ルート、共有アセットを所有し、生成済みの specs があるモジュールだけを一覧表示し、それらの specs を Toolkit のルート経由で提供し、生成処理をモジュール固有のままにすることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
Refactor OpenAPI integration so Toolkit becomes the single host for the OpenAPI UI, routes, and shared Swagger assets, while generated OpenAPI specs continue to live inside the modules they document.
Why
Current OpenAPI integration mixes shared and module-specific responsibilities.
Today:
- the shared OpenAPI HTML view lives in the project’s
shared/views/openapi - Swagger UI assets are published into a shared public asset directory
- per-module
openapi/docsandopenapi/specroutes are injected into each module - generated OpenAPI specs live inside each module under
resources/openapi/spec.json
This creates an awkward split where a shared UI is accessed through module-local route publication.
Toolkit is already the framework’s developer-facing web UI for features such as:
- database access
- logs
- emails
- module management
That makes Toolkit the better place to host OpenAPI documentation access centrally.
Goal
Make Toolkit the central OpenAPI UI host while preserving module ownership of generated specs.
Proposed Direction
Toolkit should own OpenAPI UI hosting
Toolkit should become the single place that owns:
- OpenAPI pages/views
- OpenAPI routes
- shared Swagger UI assets
OpenAPI should no longer rely on shared non-Toolkit HTML views or per-module docs route injection for UI access.
Generated specs should remain module-owned
Generated specs should continue to live inside each documented module:
modules/{Module}/resources/openapi/spec.json
This keeps OpenAPI output aligned with the module that owns the API.
Toolkit should discover only generated specs
Toolkit should list only modules that already have generated OpenAPI spec files.
Discovery should be based on the presence of:
resources/openapi/spec.json
Toolkit should not try to infer availability only from annotation sources.
Toolkit should serve specs through Toolkit routes
Toolkit should expose module OpenAPI specs through Toolkit-owned routes rather than relying on direct file access or module-local openapi/spec routes.
Generation command should stop owning shared UI concerns
The current module-targeted OpenAPI command should no longer publish shared UI assets or inject module docs routes.
Its responsibility should be reduced to module-specific spec generation.
Because of that narrower responsibility, the command name should be reviewed and likely changed from:
install:openapi
to something more accurate such as:
openapi:generate
A backward-compatible alias can be considered separately if needed.
UX Expectations
- if Toolkit is installed but no module has a generated spec yet, Toolkit should show an empty state rather than a broken page
- users must run the spec generation command for a module before that module appears in Toolkit’s OpenAPI UI
Acceptance Criteria
- Toolkit owns the OpenAPI UI entry point
- Toolkit owns the OpenAPI routes/pages
- Toolkit owns the shared Swagger UI asset usage
- generated specs remain stored inside each module under
resources/openapi/spec.json - Toolkit lists only modules that already have generated spec files
- Toolkit serves module specs through Toolkit routes
- per-module OpenAPI docs route injection is no longer required for the Toolkit-hosted flow
- the module-targeted OpenAPI command is reduced to spec-generation responsibility and its command naming is reviewed accordingly
Notes
Relevant code:
src/Console/Commands/OpenApiCommand.phpsrc/Console/Commands/InstallToolkitCommand.phpsrc/Module/Templates/Toolkit- project
shared/views/openapi/openapi.php - project
public/assets/OpenApiUi - module
resources/openapi/spec.json - module
Controllers/OpenApi/*
This ticket should be treated as the first OpenAPI/Toolkit integration step. It centralizes OpenAPI hosting in Toolkit without changing module ownership of generated specs.
- 主要言語
- PHP
- スター
- 36
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quantum-php/framework のほかの issue
-
routing testing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quantum-php/framework#547 ·
-
view
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
quantum-php/framework#542 ·
-
enhancement http
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
quantum-php/framework#565 · コメント 1 件 ·
-
components view
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
quantum-php/framework#551 ·
-
Add explicit @version special route token support for API major versioning within a single module オープンrouting
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
quantum-php/framework#550 ·
quantum-php/framework の issue をすべて見る
似ている issue
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
UX
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MagnaCapax/PMSS#949 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Automattic/static-site-importer#1829 ·