magento2: Property "children" does not have setter in class Magento\Catalog\Api\Data\CategoryInterface
“children” field should not be included in documentation ( http://devdocs.magento.com/swagger/index_21.html ) of possible body of POST /V1/categories in catalogCategoryRepositoryV1 or it should be ignored in webservice itself.
The same applies to documentation of body of PUT /V1/categories/{id} webservice.
Preconditions
- Magento 2.1.7
Steps to reproduce
- Create POST request to /rest/V1/categories endpoint with body:
{
"category": {
"is_active": true,
"name": "Test",
"children": "1"
}
}
Expected result
- Category is created
Actual result
- {“message”:“Internal Error. Details are available in Magento log file. Report ID: webapi-xxxxx”}
Exception log:
Next Exception: Report ID: webapi-5953d753666e8; Message: Property "Children" does not have corresponding setter in class "Magento\Catalog\Api\Data\CategoryInterface". in /var/www/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 /var/www/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 /var/www/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#4 /var/www/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#5 /var/www/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#6 /var/www/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#7 {main} [] []
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 32 (4 by maintainers)
Commits related to this issue
- Property "children" does not have setter in class #10088 — committed to devamitbera/magento2 by devamitbera 5 years ago
- Change the function name #10088 + Throw error during category creation — committed to devamitbera/magento2 by devamitbera 5 years ago
- Adding class for handling parameter #10088 — committed to devamitbera/magento2 by devamitbera 5 years ago
+1
+1 - I’m having to unset this key prior to an Update everytime!