caprese
caprese copied to clipboard
An opinionated Rails library for creating JSONAPI servers that lets you focus on customizing the behavior of your endpoints rather than the dirty work of setting them up
The private method Error#i18n_set? calls `I18n::t(params, raise: true)`, which is no longer allowed (for good reason) since version 1.8.6. Either splat `t`, or move around.
Currently not supporting rails 6 `rails (>= 5.1.0, < 6.0.0)`
Hello! I have a small problem, my controllers are namespaced through a module like so `module MyApp` `class UsersController < ApplicationController` But then when I let the default Caprese actions,...
relationships should be accessible via the filtering, paging and sorting syntax as primary resources. ie /api/v1/posts/:post_id/comments?filter[body]=Yes! /api/v1/posts/:post_id/comments?sort=body /api/v1/posts/:post_id/comments?sort=body
## Stories * As a developer, if I send an invalid field name like `field_name2` when I mean to send `field_name`, it should respond with a detailed message about why...
Add `Content-Type: application/vnd.api+json` to accepted headers and response
JSONAPI implementations may support multiple values for a filter to reduce the number of queries on the server side: http://jsonapi.org/recommendations/#filtering ``` GET /comments?filter[post_id]=1,2 HTTP/1.1 ``` The resulting query should be...
## Story * As a developer, I don't want to manually define my attribute accessors using `caprese_is_attribute?` when I am already defining them using `attr_accessor` etc
## Stories * As a developer, I want to assign a primary key for Caprese to use by model, and by controller action ``` class Controller primary_key :id, only: :validate_code...
Allow validations and callbacks to be toggled off in models ``` class Product < ApplicationRecord validates_presence_of :price, unless: :caprese? end ```