-
Notifications
You must be signed in to change notification settings - Fork 46
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Why not json:api? #104
Comments
There are a few reasons, but the biggest one is the fact that there are so many gems out there such as jsonapi-serializers and jsonapi-resources. |
I do agree with @okuramasafumi. And somewhat related I've opened a PR to add jsonapi-serializers to the benchmark, in case you wonder how it compares speed wise with alba: #109 |
If Alba supports JSON:API, it becomes easier to implement different styles of APIs (JSON:API compatible one and flat one) with only Alba. This could be a killer feature for some. The interface would be something like: class JSONAPIResource
include Alba::Resource
jsonapi!
end
class FlatResource
include Alba::Resource
end
# This resource follows JSON:API convention
class FooResource < JSONAPIResource
attributes :id
# ...
end
# This resource follows no convention
class BarResource < FlatResource
attributes :id
# ...
end |
Hi there, Unfortunately I could not find any reference on how to configure this gem to generate JSONAPI payload, but more importantly, I'd prefer to not have But I'm more than happy to add alba to the benchmarks we're maintaining as soon you have the JSONAPI support: I appreciate your support in having this confusion sorted out. Thanks in advance! |
Hi, I'd like to mention a few things. |
Please proceed.
JSONAPI was not designed and not optimized to generate some other specs. The goal of the project is to produce a valid JSONAPI spec and be as fast as possible at it. This project is claiming that it is:
And then you claim you provide support for JSONAPI, but you don't. Next, folks recommend switching away from My goal with raising this issue is simply to clarify the current situation, if you want to keep using I hope it all makes sense. |
The way these two are presented, it appears they are meant to be related arguments, but unless I'm misunderstanding I don't believe they are. Where do you see the claim that it supports JSON:API? I see a few places where it says it doesn't and explains why, but I don't see anything that says it does.
Are there others mentioning it outside of this comment?
There is a I do sympathize with your position, though, to be clear. My own serializer implementation, |
@jgaskins thanks for sharing. I already said I have no problem keeping things the way they are, as long as it's clarified this is not JSONAPI spec. I appreciate everyone sharing their opinions, but this is merely a request to clarify things and remove any confusions. @okuramasafumi apologies for the noise raised by my comment. I'll stop entertaining this topic, since I think we already have at least a couple of solutions. 🙇 |
+1 for JSON:API support |
The author of it requested to remove it from benchmark. #104 (comment)
Hi everyone in this thread, I found it pretty hard to implement this feature. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
The library looks flexible enough so adding support in my app for json:api with this gem should be trivial, was wondering if there is a deeper reason on why not supporting it, or is simply that you want to keep this gem nice and clean?
The text was updated successfully, but these errors were encountered: