Add total count (number of objects) that the api holds of the requested type to meta, add resource types, separate id from attributes
Opened this issue · 1 comments
ccjoel commented
Add count to metadata returned on json.
maybe add id, type to data obj, then add attributes which will hold most of the attributes we put under the objects in data today.
Also, consider adding a "type" field for each resource type returned, and separate id from rest of attributes.
Example:
GET /inspections
{
meta: {
parameters: { ... },
count: 49643 // total inspection resources available
} ,
data: [
{
type: inspection,
id: 4535656,
attributes: {
business_name: "Mc Happiness",
license_numer: ...,
inspection_class: ...,
...
}
}
]
}
ccjoel commented
@marcoslhc what do you think of this?