supportsNormalization($documentation, 'json')) { throw new \InvalidArgumentException(sprintf('Argument 2 passed to %s() must implement %s and support normalization of %s. The normalizer provided is an instance of %s.', __METHOD__, NormalizerInterface::class, Documentation::class, get_class($normalizer))); } parent::__construct(function () use ($documentation, $normalizer) { $documentation = (array) $normalizer->normalize( $documentation, null, class_exists(DocumentationNormalizer::class) ? [DocumentationNormalizer::SPEC_VERSION => 3] : [] ); // TODO: remove this // Temporary fix: zircote/swagger-php does no longer support 3.0.x with x > 0 unset($documentation['openapi']); unset($documentation['basePath']); return $documentation; }); } }