I want to change The response format of fast_jsonapi gem from:
{
"data": {
"id": "8",
"type": "directory",
"attributes": {
"firstname": "Naoufal",
"lastname": "Huster",
}
}
}
To this:
{
"id": "8",
"firstname": "Naoufal",
"lastname": "Huster",
}
I'm migrating from using AMS gem to using fast_jsonapi, I want to use fast_jsonapi but keep the same response json format of AMS when rendering data.
Ruby 2.5.0 Rails 5.2.1 fast_jsonapi gem
I think this is not possible. fastjson_api
gem follows the json api standard.
Also, a similar question was asked in the repo: source