Skip to content

Custom WebApi not working in magento 2.4.4

I have create a custom webapi for QuoteRequest. It is working fine with Magento 2.4.3 < but not working with Magento 2.4.4 with php 8.1

<?xml version="1.0"?>
<routes
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/vendor_requestforquote/updatequote/" method="POST">
        <service class="VendorRequestForQuoteApiUpdateQuoteDetailsInterface" method="updateQuoteDetail"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
        <data>
            <parameter name="ajaxval" force="true">%ajaxval%</parameter>
        </data>
    </route>
</routes>

Interface

/**
     * Returns string
     *
     * @api
     * @param string $ajaxval
     * @return string
     */
    public function updateQuoteDetail($ajaxvalue);

Error on running setup:upgrade command

enter image description here