Skip to content

Commit

Permalink
Strip duplicate tags in AugmentTags (#1622)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Jul 4, 2024
1 parent 4756339 commit ad3f913
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
6 changes: 0 additions & 6 deletions Examples/swagger-spec/petstore/petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,3 @@ tags:
-
name: pets
description: pets
-
name: pets
description: pets
-
name: pets
description: pets
6 changes: 0 additions & 6 deletions Examples/using-refs/using-refs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,3 @@ tags:
-
name: Products
description: Products
-
name: Products
description: Products
-
name: Products
description: Products
1 change: 1 addition & 0 deletions src/Processors/AugmentTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __invoke(Analysis $analysis)
}

if ($usedTags) {
$usedTags = array_unique($usedTags);
$declaredTags = [];
if (!Generator::isDefault($analysis->openapi->tags)) {
foreach ($analysis->openapi->tags as $tag) {
Expand Down

0 comments on commit ad3f913

Please sign in to comment.