Skip to content

Resource level meta key #1339

Closed
Closed
@rafael

Description

Does active model serializer supports jsonapi resource meta key at the resource object level? I would like to do something like this:

// ...
{
  "type": "articles",
  "id": "1",
  "meta": { "my_metadata": true" },
  "attributes": {
    "title": "Rails is Omakase"
  },
  "relationships": {
    "author": {
      "links": {
        "self": "/articles/1/relationships/author",
        "related": "/articles/1/author"
      },
      "data": { "type": "people", "id": "9" }
    }
  }
}
// ...

I've been trying to see how to achieve this, but only been able to achieve it at the top level, not at the resource object level.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions