Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
- Fixed cURL error message assertions for cross-version compatibility
- Fixed SleekDB paginator query-state regression where `count()` could clear criteria before paginated data fetch on the same model instance (#514)
- Standardized `defineValidationRules(Request $request): void` across DemoWeb and DemoApi middleware templates
- Fixed OpenAPI installer route generation to return `Response` objects via `response()->...` helpers and avoid undefined response-variable usage (#520)
- Standardized `defineValidationRules(Request $request): void` in Toolkit middleware templates

### Added
Expand Down
8 changes: 4 additions & 4 deletions src/Console/Commands/OpenApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ private function openapiRoutes(string $module): string
{
return 'return function ($route) {
$route->group("openapi", function ($route) {
$route->get("docs", function (Quantum\Http\Response $response) {
$response->html(partial("openApi/openApi"));
$route->get("docs", function (): Quantum\Http\Response {
return response()->html(partial("openApi/openApi"));
});

$route->get("spec", function (Quantum\Http\Response $response) {
$route->get("spec", function (): Quantum\Http\Response {
$fs = Quantum\Storage\Factories\FileSystemFactory::get();
$response->json($fs->getJson(modules_dir() . "' . DS . $module . DS . 'resources' . DS . 'openapi' . DS . 'spec.json"));
return response()->json($fs->getJson(modules_dir() . "' . DS . $module . DS . 'resources' . DS . 'openapi' . DS . 'spec.json"));
});
});' . PHP_EOL;
}
Expand Down
Loading