RestKit-InExtensions
RestKit-InExtensions copied to clipboard
Support for grouping responses and requests.
trafficstars
Right now this is the way you encode responses and requests:
{
"response": [
{
"class": "Notification",
"keyPath": "notifications"
},
{
"class": "Notification",
"pathPattern": "/my/api/path/one",
"method": "GET"
},
{
"class": "Notification",
"pathPattern": "/my/api/path/two"
},
{
"class": "Notification",
"pathPattern": "/my/api/path/three",
"method": "PUT"
}
]
}
I would love to be able to group them since I believe it would make it clearer, especially on projects that contain many different Models.
{
"response": {
"Notification": [
{
"keyPath": "notifications",
"method": "GET"
},
{
"pathPattern": "/my/api/path/one",
"method": "GET"
},
{
"pathPattern": "/my/api/path/two"
},
{
"pathPattern": "/my/api/path/three",
"method": "PUT"
}
]
}
}
Also, if the key class isn't available, the class could be deduced from the name of the object containing the responses/requests.