diff --git a/Formatter/SwaggerFormatter.php b/Formatter/SwaggerFormatter.php index 02f56ad..a8bfe7c 100644 --- a/Formatter/SwaggerFormatter.php +++ b/Formatter/SwaggerFormatter.php @@ -322,6 +322,7 @@ class SwaggerFormatter implements FormatterInterface } $apiDeclaration['models'] = $this->modelRegistry->getModels(); + $this->modelRegistry->clear(); return $apiDeclaration; } diff --git a/Swagger/ModelRegistry.php b/Swagger/ModelRegistry.php index eaa98f8..327a274 100644 --- a/Swagger/ModelRegistry.php +++ b/Swagger/ModelRegistry.php @@ -34,8 +34,6 @@ class ModelRegistry protected $classes = array(); - protected $classMap = array(); - /** * @var callable */ @@ -241,4 +239,10 @@ class ModelRegistry { return $this->models; } + + public function clear() + { + $this->models = array(); + $this->classes = array(); + } }