Swagger docs show incorrect property identifier
The Swagger generated docs for the REST API show the property identifiers fomatted as camelCase but the responses from Magento 2 use snake_case identifiers.
Examples from docs:
"id": 0, "groupId": 0, "defaultBilling": "string", "defaultShipping": "string", "confirmation": "string", "createdAt": "string", "updatedAt": "string", "createdIn": "string",
Actual API response from Magento 2:
{ "id": 2, "group_id": 1, "created_at": "2016-01-28 20:36:04", "updated_at": "2016-01-28 20:36:05", "created_in": "Default Store View", "email": "[email protected]", "firstname": "Rob", "lastname": "Tull", "store_id": 1, "website_id": 1, "addresses": [], "disable_auto_group_change": 0 }
As a further note, this has already created confusion with a third party we were working with who raised the question of which format they should expect given the disparity between the docs and the actual response.
Yikes. Thanks @rtull for pointing this out. @keharper is this what you are already working owth @paliarush on, or it separate?
No, I was unaware of this issue until today.
This is internal issue 53008.
Magento can handle requests in either camelcase or snake_case, but not knowing what you're getting back is a problem. Thanks for reporting the problem.
The Development team will adjust Swagger so that it shows successful responses (200) in snake_case. I'll close this PR when they've completed the work.
MAGETWO-53008 merged to magento/magento2 develop branch
Closing. Thanks for reporting the issue @rtull .