Skip to content

Commit a081e4f

Browse files
committed
jsonapi is deprecated, just use jsonapi-renderer
From the author of jsonapi: > .. The jsonapi gem was previously just a bundle of jsonapi-serializer and jsonapi-renderer, and AMS is using only a helper class of jsonapi-renderer (namely JSONAPI::IncludeDirective). The AMS dependency was previously not properly pinned to a specific version, which I saw as a risk for many users, so I avoided updating this gem. Moreover, the name jsonapi being somewhat too generic for what this gem evolved into (namely jsonapi-rb, which bundles jsonapi-renderer and jsonapi-parser, along with serializers and deserializers, with tight integrations with various frameworks), I decided to stay away from it for fairness. > TL;DR: Yes, people should use jsonapi-parser and jsonapi-renderer directly (or give a try to jsonapi-rb, depending on their needs). We should also update jsonapi-renderer to the latest, currently 0.1.2, but I thought that should be a separate PR.
1 parent 81a9fbd commit a081e4f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Fixes:
1414

1515
Misc:
1616

17+
- [#2055](https://github.com/rails-api/active_model_serializers/pull/2055)
18+
Replace deprecated dependency jsonapi with jsonapi-renderer. (@jaredbeck)
1719
- [#2021](https://github.com/rails-api/active_model_serializers/pull/2021) Make test attributes explicit. Tests have Model#associations. (@bf4)
1820
- [#1981](https://github.com/rails-api/active_model_serializers/pull/1981) Fix relationship link documentation. (@groyoh)
1921
- [#2035](https://github.com/rails-api/active_model_serializers/pull/2035) Document how to disable the logger. (@MSathieu)

active_model_serializers.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Gem::Specification.new do |spec|
4242
# 'minitest'
4343
# 'thread_safe'
4444

45-
spec.add_runtime_dependency 'jsonapi', '0.1.1.beta6'
45+
# TODO: Latest jsonapi-renderer is 0.1.2
46+
spec.add_runtime_dependency 'jsonapi-renderer', '0.1.1.beta1'
4647
spec.add_runtime_dependency 'case_transform', '>= 0.2'
4748

4849
spec.add_development_dependency 'activerecord', rails_versions

0 commit comments

Comments
 (0)