mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-06 15:40:54 +00:00
feat: enable new content type
- make symfony controller accept application/pdf and image/png formats
This commit is contained in:
parent
6bb6f1b28a
commit
d63a30d28b
@ -211,6 +211,14 @@ class Controller extends AbstractController
|
||||
return 'application/xml';
|
||||
}
|
||||
|
||||
if (in_array('application/pdf', $accept) && in_array('application/pdf', $produced)) {
|
||||
return 'application/pdf';
|
||||
}
|
||||
|
||||
if (in_array('image/png', $accept) && in_array('image/png', $produced)) {
|
||||
return 'image/png';
|
||||
}
|
||||
|
||||
// If we reach this point, we don't have a common ground between server and client
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user