diff --git a/Examples/swagger-spec/petstore/petstore.yaml b/Examples/swagger-spec/petstore/petstore.yaml index efefad4b..d2952ca5 100644 --- a/Examples/swagger-spec/petstore/petstore.yaml +++ b/Examples/swagger-spec/petstore/petstore.yaml @@ -97,9 +97,3 @@ tags: - name: pets description: pets - - - name: pets - description: pets - - - name: pets - description: pets diff --git a/Examples/using-refs/using-refs.yaml b/Examples/using-refs/using-refs.yaml index cf0830e2..8b1dc063 100644 --- a/Examples/using-refs/using-refs.yaml +++ b/Examples/using-refs/using-refs.yaml @@ -100,9 +100,3 @@ tags: - name: Products description: Products - - - name: Products - description: Products - - - name: Products - description: Products diff --git a/src/Processors/AugmentTags.php b/src/Processors/AugmentTags.php index 0aeb8fce..307dde2d 100644 --- a/src/Processors/AugmentTags.php +++ b/src/Processors/AugmentTags.php @@ -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) {