Closed
Description
Preconditions (*)
- Magento 2.2.x / Magento 2.3.x both CE / EE & 2.4-develop
Steps to reproduce (*)
- Create a new module which will add new webapi route
- Create a new deserializer using
di.xml
in your module
<type name="Magento\Framework\Webapi\Rest\Request\DeserializerFactory">
<arguments>
<argument name="deserializers" xsi:type="array">
<item name="text_plain" xsi:type="array">
<item name="type" xsi:type="string">text/plain</item>
<item name="model" xsi:type="string">Custom\Module\Webapi\Rest\Request\Deserializer\Plain</item>
</item>
</argument>
</arguments>
</type>
Expected result (*)
- New content type accepted by REST API
Actual result (*)
-
All CORE defined content types for API are no longer working and return 400 error
-
Only new defined content type is accepted
It was my understanding that DI.XML is used to extend CORE features, not OVERWRITE them.
Metadata
Metadata
Assignees
Labels
Issue recommended for the contribution dayUse with concrete module component label E.g. "Component: Api" + "Catalog"Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchAffects critical data or functionality and forces users to employ a workaround.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Projects
Status
Done