Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip duplicate tags in AugmentTags #1622

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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