Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add "application/vnd.api+json" support for #[MapRequestPayload] #60701

Open
@LeikoDmitry

Description

@LeikoDmitry

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp