diff --git a/generate-spec b/generate-spec index 1bec5c9..8d47ece 100755 --- a/generate-spec +++ b/generate-spec @@ -737,6 +737,10 @@ foreach ($scopePaths as $scope => $paths) { foreach ($routeData['responses'] as $statusCode => $responseData) { if (isset($responseData['content']['application/json'])) { $usedSchemas = array_merge($usedSchemas, Helpers::collectUsedRefs($responseData['content']['application/json']['schema'])); + } elseif (isset($responseData['content']['*/*']['schema']['type'], $responseData['content']['*/*']['schema']['format']) + && $responseData['content']['*/*']['schema']['type'] === 'string' + && $responseData['content']['*/*']['schema']['format'] === 'binary') { + Logger::info("app", "Binary response from '$httpMethod $url' - Skipping schema reading"); } else { Logger::warning("app", "Could not read used schemas for response to '$httpMethod $url' with status code $statusCode"); }