cdunn / grape-jsonapi-resources

Serialize objects via JSONAPI::Resources for Grape API
MIT License
20 stars 8 forks source link

namespace #1

Closed ffaerber closed 9 years ago

ffaerber commented 9 years ago

it is possible to set the namespace in the json output?

{
  "data": {
    "id": "ef340c8e-0688-453e-892d-beab7ea9c73b",
    "type": "profiles",
    "links": {
      "self": "api/v1/profiles/ef340c8e-0688-453e-892d-beab7ea9c73b"
    },
    "attributes": {
      "slug": "ffaerber",
      "user-name": "ffaerber"
    },
    "relationships": {
      "groups": {
        "links": {
          "self": "api/v1/profiles/ef340c8e-0688-453e-892d-beab7ea9c73b/relationships/groups",
          "related": "api/v1/profiles/ef340c8e-0688-453e-892d-beab7ea9c73b/groups"
        }
      },
  ...
ffaerber commented 9 years ago

sorry. i found this. https://github.com/cdunn/grape-jsonapi-resources/blob/726e259b5fa99a357c7cb0aaa41339fe6544e5cc/spec/grape-jsonapi-resources/formatter_spec.rb#L14