diff --git a/config/orion.php b/config/orion.php index 0e491262..5af91e07 100644 --- a/config/orion.php +++ b/config/orion.php @@ -27,6 +27,7 @@ 'servers' => [ ['url' => env('APP_URL').'/api', 'description' => 'Default Environment'], ], + 'tags' => [] ], 'transactions' => [ 'enabled' => false, diff --git a/src/Specs/Builders/TagsBuilder.php b/src/Specs/Builders/TagsBuilder.php index 15dedce6..f7cb8bb7 100644 --- a/src/Specs/Builders/TagsBuilder.php +++ b/src/Specs/Builders/TagsBuilder.php @@ -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}", ]; }