Method: JSONAPI::ResourceSerializer#url_generator
- Defined in:
- lib/jsonapi/resource_serializer.rb
#url_generator ⇒ Object (readonly)
Options can include include:
Purpose: determines which objects will be side loaded with the source objects in a linked section
Example: ['comments','author','comments.tags','author.posts']
fields:
Purpose: determines which fields are serialized for a resource type. This encompasses both attributes and
relationship ids in the links section for a resource. Fields are global for a resource type.
Example: { people: [:id, :email, :comments], posts: [:id, :title, :author], comments: [:id, :body, :post]}
key_formatter: KeyFormatter class to override the default configuration base_url: a string to prepend to generated resource links
15 16 17 |
# File 'lib/jsonapi/resource_serializer.rb', line 15 def url_generator @url_generator end |