Skip to content

Commit f83d5ee

Browse files
committed
Consistently refer to the 'JSON API' and the 'JsonApi' adapter
1 parent 26d90bf commit f83d5ee

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The key can be customized using `meta_key` option.
138138
render json: @post, meta: { total: 10 }, meta_key: "custom_meta"
139139
```
140140

141-
`meta` will only be included in your response if you are using an Adapter that supports `root`, as JsonAPI and Json adapters, the default adapter (Attributes) doesn't have `root`.
141+
`meta` will only be included in your response if you are using an Adapter that supports `root`, as JSON API and Json adapters, the default adapter (Attributes) doesn't have `root`.
142142

143143
### Overriding association methods
144144

@@ -184,7 +184,7 @@ Doesn't follow any specifc convention.
184184
It also generates a json response but always with a root key. The root key **can't be overridden**, and will be automatically defined accordingly with the objects being serialized.
185185
Doesn't follow any specifc convention.
186186

187-
#### JSONAPI
187+
#### JSON API
188188

189189
This adapter follows 1.0 of the format specified in
190190
[jsonapi.org/format](http://jsonapi.org/format). It will include the associated
@@ -276,7 +276,7 @@ The `url` declaration describes which named routes to use while generating URLs
276276
for your JSON. Not every adapter will require URLs.
277277
## Pagination
278278

279-
Pagination links will be included in your response automatically as long as the resource is paginated using [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate) and if you are using a ```JSON-API``` adapter.
279+
Pagination links will be included in your response automatically as long as the resource is paginated using [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate) and if you are using a ```JSON API``` adapter.
280280

281281
Although the others adapters does not have this feature, it is possible to implement pagination links to `JSON` adapter. For more information about it, please see in our docs [How to add pagination links](https://github.com/rails-api/active_model_serializers/blob/master/docs/howto/add_pagination_links.md)
282282

docs/general/adapters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Doesn't follow any specifc convention.
1717
It also generates a json response but always with a root key. The root key **can't be overridden**, and will be automatically defined accordingly to the objects being serialized.
1818
Doesn't follow any specifc convention.
1919

20-
### JSONAPI
20+
### JSON API
2121

2222
This adapter follows **version 1.0** of the format specified in
2323
[jsonapi.org/format](http://jsonapi.org/format). It will include the associated

docs/howto/add_pagination_links.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# How to add pagination links
22

3-
### JSON-API adapter
3+
### JSON API adapter
44

5-
Pagination links will be included in your response automatically as long as the resource is paginated and if you are using a ```JSON-API``` adapter.
5+
Pagination links will be included in your response automatically as long as the resource is paginated and if you are using a ```JSON API``` adapter.
66

77
If you want pagination links in your response, use [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate).
88

test/action_controller/serialization_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def render_using_implicit_serializer
1212

1313
def render_using_default_adapter_root
1414
with_adapter ActiveModel::Serializer::Adapter::JsonApi do
15-
# JSON-API adapter sets root by default
15+
# JSON API adapter sets root by default
1616
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
1717
render json: @profile
1818
end
@@ -144,7 +144,7 @@ def generate_cached_serializer(obj)
144144

145145
def with_adapter(adapter)
146146
old_adapter = ActiveModel::Serializer.config.adapter
147-
# JSON-API adapter sets root by default
147+
# JSON API adapter sets root by default
148148
ActiveModel::Serializer.config.adapter = adapter
149149
yield
150150
ensure

0 commit comments

Comments
 (0)