Replies: 3 comments
-
@manojmj92 I agree there is a need to standardize the APIs. I'd like to stick with jbuilder now. We can probably remove all |
Beta Was this translation helpful? Give feedback.
-
Even making use of something like Active Model Serializers might help with this for now, looks like you could integrate Grape later. I know this issue wasn't pertaining directly to performance, but I know in the past when I swapped from using Jbuilder to serializers the performance increase was definitely noticeable. Also I just prefer the model-layer handling the serialization over the view. Would be a pretty simple process to start using serializers for most things over Jbuilder. Just my two cents, GitHub explore sent me here and this caught my eye. 👋 |
Beta Was this translation helpful? Give feedback.
-
@joedarc Thanks for the input :D But Active model serializers are definitely in our consideration and is what we use in some of the other projects. So once things are stable we will definitely revisit this. http://www.carlosramireziii.com/which-json-serializer-to-use-for-a-new-rails-api.html https://www.reddit.com/r/ruby/comments/2lcldk/activemodelserializers_vs_jbuilder/ |
Beta Was this translation helpful? Give feedback.
-
Right now we are using the simple
render json: object
way to render API responses.While this is all right for a small product and a small team, I think we are now at a stage where we should be worrying about maintainability, given that more and more contributors are showing interest to contribute to our project.
Keeping this in mind, I would like us to adopt to some standard while rendering API responses.
I am not a fan of json_api spec, and I would like to stick to simple json responses, but would like us to use something like Grape to maintain the structure of API responses.
Open to suggestions, if majority agrees we can start moving towards rendering the responses with grape.
@subintp @pranavrajs @sojan-official @nithindavid
Beta Was this translation helpful? Give feedback.
All reactions