Closed oleksmarkh closed 7 years ago
question: should we align with some sort of convention? One example: http://zalando.github.io/restful-api-guidelines/naming/Naming.html
I like this convention. As for JSON responses, I suggest using camelCase for all kind of properties.
suggestion: use Number
type for id
s
@zverev , @bkmy43 , guys - let's agree on camelCase vs. snake_case. While Zalando suggests snake_case (probably, because of Python), http://json-schema.org/examples.html suggests camelCase. I'd +1 camelCase - because it's easier to apply a transforming middleware on the back-end rather then injecting that thing into transport layer (or whatever) on the front-end.
I personally would prefer snake, but can live with camelCase as well, if both of you vote for it
Closing as no objections raised against data structure itself. We assume some metadata to be introduced later on.
(moved from https://github.com/Crisismap/crisismap-data/issues/1)
Categories
GET /api/categories(/:id)
Items
GET /api/categories/:category_id/items(/:item_id)
See JSON + GeoJSON specs.
Also, these definitions could be associated with front-end internal data store (see https://github.com/Crisismap/crisismap-frontend/issues/5), though schemas themselves don't have to be coupled (https://github.com/Crisismap/crisismap-frontend/issues/7 is responsible for retrieving and storing this intermediate data).