Skip to content

Commit 9f42408

Browse files
authored
Only add tags that are missing from config
By this, I hope to be able to use config to describe the tags for my API docs page renderer, since it uses the last instance of the defined tag by default (which always ends up being this dummy description).
1 parent fbfdb66 commit 9f42408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Specs/Builders/TagsBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function build(): array
2424
$tags = collect(config('orion.specs.tags'));
2525

2626
foreach ($resources as $resource) {
27-
$tags[] = [
27+
if (!$tags->contains('name', $resource->tag)) $tags[] = [
2828
'name' => $resource->tag,
2929
'description' => "API documentation for {$resource->tag}",
3030
];

0 commit comments

Comments
 (0)