Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for JSON API 1.0 #82

Closed
barelyknown opened this issue May 29, 2015 · 28 comments
Closed

Support for JSON API 1.0 #82

barelyknown opened this issue May 29, 2015 · 28 comments

Comments

@barelyknown
Copy link

I'm not sure if you're going to update this library to support JSON API 1.0, but if you are, I submitted this PR eneuhauser#14 to a more up to date fork that you might want to build on.

@SeyZ
Copy link

SeyZ commented Jun 1, 2015

👍

@jcloutz
Copy link

jcloutz commented Jun 1, 2015

1.0 support would be great

@koemeet
Copy link

koemeet commented Jun 1, 2015

Nice 👍 Would be awesome!

@jonkoops
Copy link
Contributor

jonkoops commented Jun 2, 2015

I have all intention of getting this library to be complaint with JSON API 1.0, @eneuhauser is doing a lot of awesome work we can all benefit from.

@ballPointPenguin
Copy link

Is this library being dovetailed by ember data 1.0?
Will ember data just use this library to add support for the JSON API?

@gr0uch
Copy link
Collaborator

gr0uch commented Jun 8, 2015

@ballPointPenguin I'm not really sure, AFAIK Ember Data has not even preliminary support for JSON API yet, though the core devs are aware of @eneuhauser's fork. It will likely be re-implemented by the core devs, perhaps @igorT knows.

@jonkoops
Copy link
Contributor

jonkoops commented Jun 8, 2015

@daliwali From what I've heard a JSON API adapter will be introduced by the Ember Data team.

If such a library were to be introduced I think we should focus our efforts there and migrate our users as gracefully as we can. There is no use fragmenting the user base over different libraries.

@eneuhauser I would love to have your opinion on this matter seeing you've been such a prolific contributor to the project.

@ballPointPenguin
Copy link

Agreed. See, for example
emberjs/data#2905 & emberjs/data#2904

@ballPointPenguin
Copy link

Also very relevant: eneuhauser#14

@igorT
Copy link

igorT commented Jun 8, 2015

@daliwali we changed our serializers and store apis to use json api, and adding a json api serializer is the next step (approximately 0 lines of code for normalization, as our internal format is json api now). I would expect it to land this week

@gr0uch
Copy link
Collaborator

gr0uch commented Jun 9, 2015

@igorT 👍

@eneuhauser
Copy link
Collaborator

@igorT This is awesome! One thing the ember-json-api library has is an extensive set of unit / integration tests. There has been some work to get them up-to-date with version 1.0 of JSON API and I would like to see how ember-data stacks up against the test cases.

This is also a good community to reach out to for people that have implemented the JSON API spec and many (including myself) are upgrading to 1.0, so plenty to test the new ember-data implementation.

@igorT
Copy link

igorT commented Jun 10, 2015

@wecc had looked at the tests and copied/repurposed them i believe.

@jonkoops
Copy link
Contributor

So I'm thinking we should probably start planning a migration path for our users as soon as the official code lands. Currently the meta issue tracking 1.0 of Ember Data is pinned for tomorrow (June 12th) but looking at the list of open issues I'm guessing we're still getting at least one beta release before the actual stable hits.

@kurko @eneuhauser @daliwali Just to get some confirmation, you guys all agree we should go for a depreciation of this library in favour of the official Ember Data one? If we can get a consensus here I'll create an issue to track what needs to be done.

@gr0uch
Copy link
Collaborator

gr0uch commented Jun 11, 2015

@jonkoops in favor 👍

@barelyknown
Copy link
Author

I agree that it makes the most sense to deprecate this library in favor of official Ember Data support.

@eneuhauser
Copy link
Collaborator

@jonkoops I'm excited to be a core contributor, but I vote we deprecate the library. It was fun while it lasted.

I'm finally getting back to my Ember project using JSON API, so I can dedicate some time to this library. My plan is to review Ember Data 1.0. Igor indicated the tests have been integrated with the core, but I'd like to just run a sanity check against them. If there are any gaps, I can merge the 1.0 pull request to use this library as a polyfill until Ember Data is completed.

@kurko
Copy link
Owner

kurko commented Jun 12, 2015

@eneuhauser I agree with you. I already talked to @igorT about it and the right thing to do is to deprecate this one. However, I want to do that at the right moment. A lot of people are using this lib and I think it'd be a disservice to deprecate it while ED is beta.

I'd deprecate it as soon as people have solid alternative in ED. Thoughts?

@jonkoops
Copy link
Contributor

@kurko Yes, I agree. We definitely should not start deprecarion without having a solid alternative. I think we should target deprecation when Ember Data has a stable release.

@EmergentBehavior
Copy link

Ember Data 1.13 was released less than 24 hours ago. According to emberjs/data#2905, the JSON-API adapter is now baked in and may be usable from a nightly.

@SeyZ
Copy link

SeyZ commented Jun 18, 2015

🎉 I use the JSONAPI adapter/serializer from the canary build. It works really well.

@jonkoops
Copy link
Contributor

@EmergentBehavior @SeyZ Great to hear! I'll start the deprecation process as soon as this lands in a stable form.

@jonkoops
Copy link
Contributor

I've opened up an issue (#86) to discuss deprecation and build a todo list. If you have anything to add about what we can do to improve this process, please let me know.

@jonkoops
Copy link
Contributor

@eneuhauser I think we should get the work done in your repo + the 1.0 pull request over to this project. Compliance with v1.0 of the spec is essential to a smooth migration.

@eneuhauser
Copy link
Collaborator

@jonkoops Yeah, we can work from the pull requests and issues in my repo. I have my server upgraded to 1.0, so I have live services I can verify the 1.0 pull request.

The biggest issues will be upgrading ember-data. I briefly tested with 1.13.2. It worked, but I got several deprecation warning specific to the custom adapter and serializer.

@EmergentBehavior
Copy link

@eneuhauser I had some deprecation warnings too with JSONAPIAdapter/Serializer but was able to overcome them by doing the following:

In application adapter, add:

shouldReloadAll: function() {
        return true;
    }

In application serializer, add:
isNewSerializerAPI: true

I had to tweak the serializers to camelCase keys, but otherwise the adapter is working great for me with a JSON-API compatible service I wrote for server-side.

@jonkoops
Copy link
Contributor

jonkoops commented Jul 2, 2015

@eneuhauser Has blessed us with a marvellous pull request bringing us up to speed with v1.0 spec compliance. I'd appreciate it if some of you could go ahead and give it a try, so we can iron out any bugs. I'll probably be spending next week updating some apps as well. The pull request can be found here: #88

@jonkoops
Copy link
Contributor

I am happy to report we just added JSON API v1.0 support by merging the before mentioned pull request. A huge thanks again to @eneuhauser and @barelyknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests