jsonapi
jsonapi copied to clipboard
New Example on how to configure this lib.
Any chance we can get a newer example application? A few things are not so clear, like how to use the ErrorView in phoenix etc...
@zacksiri do you have some specific questions in mind? It may help a bit. I'm hoping to work on an example application in the next few weeks too.
@jherdman I'm available to help if you'd like a hand. Having some idea of what folks like @zacksiri would find useful would be helpful; I built an example app for Ueberauth that I thought covered the bases but there's been recent requests for a lot of changes.
@jherdman @doomspork Hey, yeah I mean an example app, showing how to setup the hex with great defaults that will work for most case scenarios.
- how to handle errors
- how to render relationships
- how to do hypermedia
- how to get the correct resource name
+1, would be very helpful to have an updated example app. Especially for how to handle getting errors (changeset_view.ex, error_view.ex, etc) to properly show in the jsonapi spec format
@b4ugh Would very happily and quickly accept contributions!
Well, I'm struggling to figure out how to get them (the error views) to work, or else I would! 😂 But if/once I'm able to figure it out I'd be happy to lend a hand!
I've been thinking as of late that this lib should extract some of the Phoenix-y concerns, which should also include some modules for converting Ecto error changesets to responses. Hopefully I can find some time to finish drafting a mega RFC soon. I'll try to post a gist of the code I'm using for error changesets as soon as possible.
On Fri, Aug 7, 2020, 11:45 Dan Baugh [email protected] wrote:
Well, I'm struggling to figure out how to get them (the error views) to work, or else I would! 😂 But if/once I'm able to figure it out I'd be happy to lend a hand!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeregrine/jsonapi/issues/138#issuecomment-670581469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAZZCQBV7AJERGUA2P5E3R7QOSLANCNFSM4GA4VDHA .
@b4ugh my changeset_view.ex looks like this https://gist.github.com/jherdman/d6c89166d4d427108629ec3d1618d199. I don't think we ought to pull this into the lib yet, I'm sure it can be tightened up (nor am I sure it belongs in this lib proper). Hopefully this gets you started.
@jherdman Looks pretty good to me!