Comments (3)
@arantir, the plan is to provide options for most of the major features in JSON API. I have a branch started, https://github.com/cerebris/jsonapi-resources/tree/toplevel_links, that started the configuration options for URL Templates. It's not complete, but will give you an idea of how I plan to implement the configuration options. This branch may never get merged because of json-api/json-api#311.
Here's a config example using that branch
JSONAPI.configure do |config|
config.resource_links_style = :collection_objects
end
Look in https://github.com/cerebris/jsonapi-resources/blob/toplevel_links/lib/jsonapi/configuration.rb for more options. Again, this will most likely change as a result of json-api#311.
PRs for fixes and new features are most welcome. I suspect I won't add support for every feature myself, but if it's in the spec I'd like to support it in JR. That's one more reason to keep JSON API nice and tight.
from jsonapi-resources.
I should add that one area I'm hoping to focus on is performance. Some of the options, such as turning off ids for has_many associations and not doing side loading of data should allow for a much more efficient serializer with much less load on the database. Of course this will be at the expense of more requests, so it making things configurable is very important. One size certainly doesn't fit all.
from jsonapi-resources.
Closing
from jsonapi-resources.
Related Issues (20)
- Read only (immutable) relationships
- MySQL Syntax Error in ActiveRelationResource (0.10.x) HOT 7
- Incorrect handling of null or empty nested includes
- suggestion regardlin relationships
- Custom filters sometimes work incorrectly for nested routes HOT 1
- [0.9.12] Need to add handle the invalid request
- BUG: malformed includes raises NoMethodError HOT 1
- Error: undefined method relationship for "":String .../lib/jsonapi/path_segment.rb:33:in eql? HOT 1
- Add support for Ruby 3.1 and Rails 7.0 HOT 16
- Bug report template is broken
- BUG: posting a bad id to a has_may raises a 500. Should raise a 4xx
- Performance on selecting all columns instead of specified attributes
- or
- Resource option `always_include_linkage_data: true` not working HOT 5
- Repeating the same sort attribute with reverse direction overwrites the previous direction for that attribute
- Documentation for ResourceSerializer with includes is incorrect HOT 3
- What's the status of version 0.11.0?? IS THIS PROJECT DEAD? HOT 1
- Alternative to ActiveRelationResource which does not produce extra DB queries HOT 2
- Adopt the `frozen_string_literal` magic comment to optimize string storage
- sort by country that is related to resource not directly but through the third relation is not work properly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonapi-resources.