Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
7.1
Description
In our project we use header “application/vnd.api+json” for REST API and when we call the required controller we get “Unsupported format” exception. Is it possible to make an additional parameter in the future so that we can specify the required “Content-type”?
How to reproduce
Add header Content-Type withapplication/vnd.api+json
Possible Solution
MapRequestPayload.php
public function __construct( public readonly array|string|null $acceptFormat = null, public readonly array $serializationContext = [], public readonly string|GroupSequence|array|null $validationGroups = null, string $resolver = RequestPayloadValueResolver::class, public readonly int $validationFailedStatusCode = Response::HTTP_UNPROCESSABLE_ENTITY, public readonly ?string $type = null, public readonly ?string $contentType = null, ) { parent::__construct($resolver); }
Additional Context
No response