You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ AMS does this through two components: **serializers** and **adapters**.
10
10
Serializers describe _which_ attributes and relationships should be serialized.
11
11
Adapters describe _how_ attributes and relationships should be serialized.
12
12
13
-
By default AMS will use the **Flatten Json Adapter**. But we strongly advise you to use **JsonApi Adapter** that follows 1.0 of the format specified in [jsonapi.org/format](http://jsonapi.org/format).
13
+
By default AMS will use the **Attributes Adapter**. But we strongly advise you to use **JsonApi Adapter** that follows 1.0 of the format specified in [jsonapi.org/format](http://jsonapi.org/format).
14
14
Check how to change the adapter in the sections bellow.
`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 (FlattenJson) doesn't have `root`.
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`.
142
142
143
143
### Overriding association methods
144
144
@@ -174,7 +174,7 @@ end
174
174
175
175
### Built in Adapters
176
176
177
-
#### FlattenJSON
177
+
#### Attributes
178
178
179
179
It's the default adapter, it generates a json response without a root key.
Copy file name to clipboardExpand all lines: docs/general/adapters.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
AMS does this through two components: **serializers** and **adapters**.
4
4
Serializers describe _which_ attributes and relationships should be serialized.
5
5
Adapters describe _how_ attributes and relationships should be serialized.
6
-
You can use one of the built-in adapters (```FlattenJSON``` is the default one) or create one by yourself, but you won't need to implement an adapter unless you wish to use a new format or media type with AMS.
6
+
You can use one of the built-in adapters (```Attributes``` is the default one) or create one by yourself, but you won't need to implement an adapter unless you wish to use a new format or media type with AMS.
7
7
8
8
## Built in Adapters
9
9
10
-
### FlattenJSON - Default
10
+
### Attributes - Default
11
11
12
12
It's the default adapter, it generates a json response without a root key.
13
13
Doesn't follow any specifc convention.
@@ -44,7 +44,7 @@ or
44
44
ActiveModel::Serializer.config.adapter =:json_api
45
45
```
46
46
47
-
If you want to have a root key in your responses you should use the Json adapter, instead of the default FlattenJson:
47
+
If you want to have a root key in your responses you should use the Json adapter, instead of the default Attributes:
Copy file name to clipboardExpand all lines: docs/howto/add_root_key.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# How to add root key
2
2
3
-
Add the root key to your API is quite simple with AMS. The **Adapter** is what determines the format of your JSON response. The default adapter is the ```FlattenJSON``` which doesn't have the root key, so your response is something similar to:
3
+
Add the root key to your API is quite simple with AMS. The **Adapter** is what determines the format of your JSON response. The default adapter is the ```Attributes``` which doesn't have the root key, so your response is something similar to:
0 commit comments