Giter Site home page Giter Site logo

gregschmit / rails-rest-framework Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 2.0 1.68 MB

A framework for DRY RESTful APIs in Ruby on Rails.

Home Page: https://rails-rest-framework.com

License: MIT License

Ruby 81.76% Shell 0.77% HTML 17.48%
api rails rest restful-api

rails-rest-framework's People

Contributors

dependabot[bot] avatar gregschmit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rails-rest-framework's Issues

PUT behaves like PATCH

Issuing an update to a record via PUT behaves like PATCH, updating only the sent properties instead of completely replacing the record as would be expected. This mostly manifests when a nullable field was not originally null, but is desired to be nulled, and a PUT with new property values is sent without a null for that property.

Potentially consider a way to make PUT behave as expected, or indicate that PUT behaves like PATCH

Websockets

There is already a branch for this, but basically I want to dynamically construct ::Channel classes on each controller to allow subscribing to updates for a particular collection, and interacting with controller endpoints via action cable (or anycable).

Use `includes` more intelligently.

Right now, we include all associations in the model controller mixin. Rather, we should allow filters to include what they need to avoid including associations unnecessarily.

Support ordering/filtering by association properties

Probably by a designated column, but perhaps by specifying the target column, but then the issue is whether the user should have access to that column. So probably just by a designated column (perhaps name by default?).

Display allowed params (with field config) in browsable API

For most CRUD it's just the default fields, but like for DELETE it should be nothing, and then for extra fields it should just be fields defined in their config... probably?

Either way, need to be able to say "for this extra action, here are the params that are acceptable".

Batch processing

Consider adding ability to create, update, or delete multiple records at once. Perhaps there is a configuration option to determine if this is done using efficient SQL operations without callbacks/validation, or less efficient ORM operations with callbacks/validation.

Delegate API

We should support delegating extra actions to the underlying model for the ModelControllerMixin. Collection actions can be delegated to the model, and member actions can be delegated to records. We should either enable this via configuration or provide a configuration option in the extra_actions/extra_member_actions configuration API.

Flesh out OPTIONS API

We currently support sending fields metadata, but we should also communicate the available actions (including and making distinction for member actions) on a controller. We should also coerce more validations to top-level information on the fields metadata.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.