-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add new basic adapter and serializer. #11
Conversation
I'm not great with ember-cli so I'm going to wait for someone else to suggest how to plug this new code in easily so I can give it a whirl on my own project. From looking over the code in your commit I have a couple questions:
|
Point 1: The existing adapter uses underscorize, I changed to using dasherize because slugs in Django use dashes and that's how I setup my API URLs usually. But matching the defaults in DRF is a better strategy so this is a mistake and I'll update the PR shortly. Thanks for pointing this out. Point 2: I overrode
Can you see any problems with this reasoning? |
I just pushed a new version of the commit with lower case model name as the default. I also updated the README to reflect the change. |
@benkonrath nice start! I need to take more time to give this a thorough look over, but I think we are on the right track here. |
@benkonrath Point 2 makes sense. I actually misread the DRF code on point 1 - DRF does not specify a default url scheme. I still think that dashes are a bad idea because as I mention you cannot make custom api endpoints with dashes. Thanks for taking my suggestion. I have a repo up here with my very early workings on a DRF side adapter. Right now only the output side is written - input to come tomorrow! Any feedback would be very much appreciated. |
@g-cassie Clearly I mis-read the code as well. I've updated the README to correct the problem but I still agree with the change. @dustinfarris Great! Let me know if you want me to adjust anything - like move the docs to a different location, etc. I can squash the commits in the pull request before you merge it - no sense in having a polluted git history. Just let me know. |
Add new basic adapter and serializer.
@benkonrath not worried about the git history at the moment, in fact I'd rather have more details than less in this early stage. I merged your PR so I can start working on this myself. Ping me in IRC when you have a chance to discuss. |
Hi @dustinfarris @benkonrath I wanna help out with the re-write, do you have like a trello board or similar where I can see the remaining tasks? Or maybe I can set one up, so we can assign tasks more easily and track their progress. What is the IRC channel so I can get involved? |
@holandes22 Great to hear. I think that github issues is a good way to keep track of the tasks. The first task is getting the tests up and running which I'm working on now. Once that's done, I'll create a bunch of issues for things that need to be done and you can pick up anything that interests you. Just 'watch' this repo so you get notifications of the issues and PRs. Thanks. |
@benkonrath thanks for the update :) |
@holandes22 I've tested the new adapter with list and detail retrieve. coalesceFindRequests doesn't work with DRF so you should expect one request for every item in a list retrieve. I already have a solution in the pipe for this so it's not worth spending time on this particular issue. Here's a couple of tasks that I haven't done yet:
If something doesn't work, you can file an issue but also try to fix it. Please keep the changes as small as possible because I really want to follow / think along to make sure we're meeting the re-write goals. Thanks! |
Sounds good, I'll check update/create/delete and see how it goes. Regarding pagination, is that supposed to work? DRF returns a custom format for pagination that ED does not understand and I didn't see anything in the adapter that should handle this |
@holandes22 I'm sure there's more to it though. I have to read the ED docs a little more to see how it should work. Looking at update/create/delete is probably the best for right now. |
I see, thanks for clarifying that. I'll start by checking crud operations as I don't use pagination in my API yet. I'll keep you guys posted |
@holandes22 thanks for helping out. I'm on #ember-django-adapter if you need anything. |
Just a quick note to report that delete is working with this code. |
Here's my start of the re-write. Some notes ...
It would be helpful if you could show me how to wire this code properly in. If you're not sure as well, I can spend some time reading the Ember CLI docs a little more. Comments are appreciated. Feel free to wipe out or integrate this commit into another one. This is very much a work in progress and doesn't need to be preserved in the repo history.