From 58a50468597866ac8c2846d6ae114d464c6bd480 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Mon, 13 Jun 2022 17:34:11 +0100
Subject: [PATCH] Issue #3277148 by rpayanm, andregp, joachim, Farnoosh,
 Athrylith, Jingting: ResourceResponse should document that the route it is
 used with must define the _format requirement

---
 core/modules/rest/src/ResourceResponse.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/modules/rest/src/ResourceResponse.php b/core/modules/rest/src/ResourceResponse.php
index eb955c293c28..e6900ec2449b 100644
--- a/core/modules/rest/src/ResourceResponse.php
+++ b/core/modules/rest/src/ResourceResponse.php
@@ -14,6 +14,8 @@
  * string or an object with a __toString() method, which is not a requirement
  * for data used here.
  *
+ * Routes that return this response must specify the '_format' requirement.
+ *
  * @see \Drupal\rest\ModifiedResourceResponse
  */
 class ResourceResponse extends Response implements CacheableResponseInterface, ResourceResponseInterface {
-- 
GitLab