You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate an OpenAPI description from the route map #34
The server already knows all routes (HTTP method, URL pattern, URL parameters, docblock/annotations). From that, an OpenAPI document could be generated and served, e.g. at GET /openapi.json, so clients can use Swagger UI, code generators etc.
Proposal
Target OpenAPI 3.1 (Swagger 2.0 is superseded).
Expose the route map via a public read-only accessor (e.g. getRoutes()), so the generator does not need internal access.
Ship the generator as an optional controller that can be registered via addClass(); API metadata (title, version, contact) configured on the controller, not via static properties.
Derive path parameters from $name placeholders, summaries/descriptions from docblocks or – after the planned move from docblock annotations to PHP attributes – from attributes.
Request/response schemas are out of scope for a first version.
An experimental Swagger 2.0 controller existed on the former feature/swagger branch (2015), which was never merged.
Activity