kurko / ember-json-api

JSON API adapter for Ember Data.
MIT License
254 stars 62 forks source link

Underscored or hyphenated urls? #53

Closed johanneswuerbach closed 9 years ago

johanneswuerbach commented 9 years ago

I couldn't find any hint in http://jsonapi.org/, but how should URLs for models like PlaceRequest look like? api/place_requests (ED uses this today) or api/place-requests (Everything is hyphenated in ember-cli)

//cc @stefanpenner

jamonholmgren commented 9 years ago

@johanneswuerbach , did you end up getting clarity on this?

jamonholmgren commented 9 years ago

Okay, so it looks like the jsonapi spec recommends dasherized URLs, meaning this adapter isn't conforming to that:

It is also recommended that resource types be pluralized. Dasherized and pluralized resource types can be used as URL segments without translation

Source: http://jsonapi.org/recommendations/#naming

I can work on a pull request if @kurko agrees this should happen.

DougPuchalski commented 9 years ago

:+1:

jonkoops commented 9 years ago

@jamonholmgren No need for that, work is being done the pull request for RC3 compliance to dashterize all the things. See https://github.com/eneuhauser/ember-json-api/issues/8.

jamonholmgren commented 9 years ago

Oh, nice. Thanks @jonkoops !

jonkoops commented 9 years ago

Closing this issue because @eneuhauser's work on this has been merged.