Fix OpenAPI text redirect response schemas

This commit is contained in:
Chirag Aggarwal
2026-05-14 16:48:58 +05:30
parent 6d0a76cf51
commit e1547023f6
@@ -292,7 +292,7 @@ class OpenAPI3 extends Format
}
if (!(\is_array($model)) && $model->isNone()) {
if ($produces === ContentType::TEXT->value && $response->getCode() !== 204) {
if ($produces === ContentType::TEXT->value && !\in_array($response->getCode(), [204, 301, 302, 308], true)) {
$temp['responses'][(string)$response->getCode()] = [
'description' => 'Text',
'content' => [