Skip to content

Commit

Permalink
Merge pull request #85 from emfITs/master
Browse files Browse the repository at this point in the history
Fixed wrong matching. Changed match detail to details for working openAPI
  • Loading branch information
GautierDele authored Nov 29, 2023
2 parents d9822c5 + 039ba40 commit 6f63144
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Console/Commands/DocumentationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function handle()
);

$this->info('The documentation was generated successfully!');
$this->info('Open '.url(config('rest.documentation.routing.path')).'in a web browser.');
$this->info('Open '.url(config('rest.documentation.routing.path')).' in a web browser.');
}

/**
Expand Down
14 changes: 7 additions & 7 deletions src/Documentation/Schemas/OpenAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ public function generatePaths()

if ($controller instanceof Controller) {
$path = match (Str::afterLast($route->getName(), '.')) {
'detail' => (new Path())->generateDetailAndDestroy($controller),
'search' => (new Path())->generateSearch($controller),
'mutate' => (new Path())->generateMutate($controller),
'operate' => (new Path())->generateActions($controller),
'restore' => (new Path())->generateRestore($controller),
'forceDelete' => (new Path())->generateForceDelete($controller),
default => null
'details' => (new Path())->generateDetailAndDestroy($controller),
'search' => (new Path())->generateSearch($controller),
'mutate' => (new Path())->generateMutate($controller),
'operate' => (new Path())->generateActions($controller),
'restore' => (new Path())->generateRestore($controller),
'forceDelete' => (new Path())->generateForceDelete($controller),
default => null
};

if (!is_null($path)) {
Expand Down

0 comments on commit 6f63144

Please sign in to comment.