This will determine what attributes of the resource are returned to the client in the response. You can have different sets of attributes be included in the response based on the action (e.g. create, detail, delete, list, update) or a custom format.
api/presenters/SwordPresenter
:
id
, name
, and strenght
keys.
id
attribute when making an API call to collections endpoint
/swords
to retrieve a list of sword resources.
_format
URL parameter. For example, you can present specific fields by
calling the GET /swords?_format=all_attributes
endpoint.
SwordPolicy
.