Sha256: bde3cdf278c5359614705085e4b509eaf9d40832e311f20653c8d7d2a00f6189

Contents?: true

Size: 1.51 KB

Versions: 35

Compression:

Stored size: 1.51 KB

Contents

### JsonapiCompliable

[![Build Status](https://travis-ci.org/jsonapi-suite/jsonapi_compliable.svg?branch=master)](https://travis-ci.org/jsonapi-suite/jsonapi_compliable)

[JSONAPI Suite Website](https://jsonapi-suite.github.io/jsonapi_suite)

[Documentation](https://jsonapi-suite.github.io/jsonapi_compliable)

Supported Rails versions: >= 4.1

### Upgrading to 0.11.x

Due to a backwards-incompatibility introduced in the underlying
[jsonapi-rb](http://jsonapi-rb.org) gem, specifying custom serializers
now works slightly differently.

Before:

```ruby
# app/serializers/serializable_post.rb

has_many :comments, class: SerializableSpecialComment
```

and/or

```ruby
render_jsonapi(post, class: SerializableSpecialPost)
```

This is now all handled at the controller level:

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

### Upgrading to 0.10

`sideload_whitelist` has been moved from the resource to the controller:

```diff
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](https://github.com/thoughtbot/appraisal) gem. So, run:

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

Or run tests for all versions:

```bash
$ bin/appraisal bin/rspec
```

### Generating the Documentation

```bash
$ yard doc
$ yard server
```

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
jsonapi_compliable-0.11.34 README.md
jsonapi_compliable-0.11.33 README.md
jsonapi_compliable-0.11.32 README.md
jsonapi_compliable-0.11.31 README.md
jsonapi_compliable-0.11.30 README.md
jsonapi_compliable-0.11.29 README.md
jsonapi_compliable-0.11.28 README.md
jsonapi_compliable-0.11.27 README.md
jsonapi_compliable-0.11.26 README.md
jsonapi_compliable-0.11.25 README.md
jsonapi_compliable-1.0.alpha.2 README.md
jsonapi_compliable-0.11.24 README.md
jsonapi_compliable-0.11.23 README.md
jsonapi_compliable-0.11.22 README.md
jsonapi_compliable-0.11.21 README.md
jsonapi_compliable-0.11.20 README.md
jsonapi_compliable-0.11.19 README.md
jsonapi_compliable-0.11.18 README.md
jsonapi_compliable-0.11.17 README.md
jsonapi_compliable-0.11.16 README.md