Summary
install:openapi currently generates route closures that are expected to return Quantum\Http\Response, but one generated closure can reference an undefined $response variable after contract migration.
Problem
In OpenApiCommand::openapiRoutes():
- The generated
docs route closure is migrated to function (): Quantum\Http\Response
- But if it uses
$response->html(...) without receiving/initializing $response, generated code fails at runtime (Undefined variable $response)
Expected behavior
Generated openapi routes should fully comply with the new response contract and return concrete Response objects without undefined variables.
Proposed fix
Update generated route snippets to use helpers that return response instances explicitly:
return response()->html(...)
return response()->json(...)
Acceptance criteria
install:openapi generated docs and spec closures both return Quantum\Http\Response
- No undefined variable usage in generated routes
- Generated module routes work under strict response-return middleware/route pipeline
Summary
install:openapicurrently generates route closures that are expected to returnQuantum\Http\Response, but one generated closure can reference an undefined$responsevariable after contract migration.Problem
In
OpenApiCommand::openapiRoutes():docsroute closure is migrated tofunction (): Quantum\Http\Response$response->html(...)without receiving/initializing$response, generated code fails at runtime (Undefined variable $response)Expected behavior
Generated
openapiroutes should fully comply with the new response contract and return concreteResponseobjects without undefined variables.Proposed fix
Update generated route snippets to use helpers that return response instances explicitly:
return response()->html(...)return response()->json(...)Acceptance criteria
install:openapigenerateddocsandspecclosures both returnQuantum\Http\Response