Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jonas Hovmand
    @hovmand

    Hi @kocsismate , I was wondering if you remember the reasoning behind the following commit: woohoolabs/yin@1aef043

    To me, it seems like it's forcing the presence of the data element.

    Máté Kocsis
    @kocsismate
    hey @hovmand, Exceptionally there's an issue for this commit: woohoolabs/yin#22 (refer to the linked issue because it also contains important information). But basically, you are right, it forces the presence of the data key, because the response must contain it according to JSON:API guys.
    Máté Kocsis
    @kocsismate
    I hope that I could answer your question :) But feel free to ask more if something is not clear.
    Jonas Hovmand
    @hovmand
    Missed the issue :) and yes, in the case described in the issue it should be present,, but the code will also force it to be present when a resource is included as part of the relationships information. I have a case where I request for resource A which has a to many relationship with resource B, but I don't want to include the data of B as part of the request for resource A. This results in data being an empty array, instead of being omitted.
    We're in this part of the JSON:API where I only want to have the links property.
    I'll make an issue tomorrow, and provide a better example.
    Máté Kocsis
    @kocsismate
    OK, I am looking forward to the issue :)