Skip to content

Commit

Permalink
Merge pull request #150 from a21ns1g4ts/feature/default-tags
Browse files Browse the repository at this point in the history
feat: add default tags config
  • Loading branch information
alexzarbn authored Mar 27, 2022
2 parents 0dff885 + 7131e10 commit 4b925e6
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 4b925e6

Please sign in to comment.