Giter Site home page Giter Site logo

jsonapi_compliable's Introduction

JsonapiCompliable

Build Status

JSONAPI Suite Website

Documentation

Supported Rails versions: >= 4.1

Upgrading to 0.11.x

Due to a backwards-incompatibility introduced in the underlying jsonapi-rb gem, specifying custom serializers now works slightly differently.

Before:

# app/serializers/serializable_post.rb

has_many :comments, class: SerializableSpecialComment

and/or

render_jsonapi(post, class: SerializableSpecialPost)

This is now all handled at the controller level:

render_jsonapi(post, class: {
  Post: SerializableSpecialPost,
  Comment: SerializableSpecialComment
})

Upgrading to 0.10

sideload_whitelist has been moved from the resource to the controller:

class PostsController < ApplicationController
  jsonapi resource: PostResource do
-    sideload_whitelist({ index: [:foo] })
-  end
+  sideload_whitelist({ index: [:foo] })
end

# NEW

Running tests

We support Rails >= 4.1. To do so, we use the appraisal gem. So, run:

$ bin/appraisal rails-4 bin/rspec
$ bin/appraisal rails-5 bin/rspec

Or run tests for all versions:

$ bin/appraisal bin/rspec

Generating the Documentation

$ yard doc
$ yard server

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.