Skip to content

Commit

Permalink
Add default tags config
Browse files Browse the repository at this point in the history
  • Loading branch information
a21ns1g4ts committed Feb 23, 2022
1 parent 0dff885 commit 7131e10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/orion.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'servers' => [
['url' => env('APP_URL').'/api', 'description' => 'Default Environment'],
],
'tags' => []
],
'transactions' => [
'enabled' => false,
Expand Down
5 changes: 3 additions & 2 deletions src/Specs/Builders/TagsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ public function __construct(ResourcesCacheStore $resourcesCacheStore)
public function build(): array
{
$resources = $this->resourcesCacheStore->getResources();
$tags = collect([]);
$tags = collect(config('orion.specs.tags'));

foreach ($resources as $resource) {
$tags[] = [
'name' => $resource->tag
'name' => $resource->tag,
'description' => "API documentation for {$resource->tag}",
];
}

Expand Down

0 comments on commit 7131e10

Please sign in to comment.