<div dir="ltr">After reading through the updating relationships section of the JSON API spec [1], I kind of agree with @jortel that we shouldn’t expose the join model unless it provides extra fields besides simply joining two models. Also, it might be worth adding a “content_ids” field that can be used when updating repositories (see [2]).<div><br></div><div>By the way, I also saw there was a django-rest-framework-json-api package [3]. Might be worth considering.<br><div><br></div><div>[1] <a href="http://jsonapi.org/format/#crud-updating-relationships">http://jsonapi.org/format/#crud-updating-relationships</a><br></div><div>[2] <a href="http://jsonapi.org/format/#crud-updating-resource-relationships">http://jsonapi.org/format/#crud-updating-resource-relationships</a></div></div><div>[3] <a href="https://github.com/django-json-api/django-rest-framework-json-api">https://github.com/django-json-api/django-rest-framework-json-api</a></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Oct 19, 2017 at 12:22 AM, Michael Hrivnak <span dir="ltr"><<a href="mailto:mhrivnak@redhat.com" target="_blank">mhrivnak@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Oct 18, 2017 at 4:28 PM, Dennis Kliban <span dir="ltr"><<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Exposing the RepoContent model via REST API leaves us with the most flexibility in the future. We decided on this design in issue 2873[0].<br><br>[0] <a href="https://pulp.plan.io/issues/2873" style="font-size:12.8px" target="_blank">https://pulp.plan.io/issues/28<wbr>73</a></div></blockquote><div><br></div></span><div>FWIW my read of #2873 is that we discussed a lot of different design ideas and eventually agreed that one of them had previously been implemented. I don't think we found agreement on what the design should be long-term. </div></div><span class=""><div><br></div>-- <br><div class="m_4212225649069195321gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Michael</span> <span style="margin:0px!important;padding:0px!important">Hrivnak</span></p><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Principal Software Engineer</span><span style="margin:0px!important;padding:0px!important">, <span style="margin:0px!important;padding:0px!important">RHCE</span></span> </span><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px"></span><br style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important">Red Hat</p></div></div>
</span></div></div>
</blockquote></div><br></div>