Closed
Description
"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} [] []
Metadata
Metadata
Assignees
Labels
USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it