<div dir="ltr">A few of us(1) got together for a short 'Hangout' to talk about RESTful best practices today with the idea of debating out some best practices before presenting them to the wider group here and in the next irc dev meeting to add to the coding guidelines.<div><br></div><div>In this short hangout we discussed "ID's in request bodies". It's a contentious issue in lots of RESTful circles, so we thought it worth getting into a coding guideline sooner rather than later to make sure we're consistent.</div><div><br></div><div>TL:DR: Use the Swagger attribute 'readOnly' on id fields. This means id's are encouraged in responses but are banned in requests.</div><div><br></div><div>There are lots of camps on this one, but the important thing is to be consistent across the api endpoints and ensure it's well documented. The swagger meaning of readOnly is well understood by rest users and thus accounts for the 'well documented' side, and implementing it using the Swagger plugin should mean minimal effort in ensuring it is consistent.  </div><div><br></div><div>1) Jonathan D, Tomas C, Lari T, Kyle H and I<br></div><div><br clear="all"><div><div class="m_-1068356040121644144gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><table cellspacing="0" cellpadding="0" width="410" style="font-family:'Times New Roman'"><tbody><tr><td colspan="2"><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Martin Renvoize</strong></p></td></tr><tr><td colspan="2"><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)">Development Manager</p></td></tr><tr><td colspan="2"><p style="font-family:Arial;margin:0px"><br></p></td></tr><tr><td colspan="2"><p style="font-family:Arial;margin:0px"> </p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>T:</strong> <a href="tel:%2B44%20%280%29%201483%20378728" value="+441483378728" target="_blank">+44 (0) 1483 378728</a></p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>F:</strong> <a href="tel:%2B44%20%280%29%20800%20756%206384" value="+448007566384" target="_blank">+44 (0) 800 756 6384</a></p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>E:</strong> <a href="mailto:martin.renvoize@ptfs-europe.com" style="color:rgb(45,92,136);text-decoration:none" target="_blank">martin.renvoize@ptfs-<wbr>europe.com</a></p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><a href="https://www.ptfs-europe.com" style="color:rgb(45,92,136);text-decoration:none" target="_blank">www.ptfs-europe.com</a></p></td></tr><tr><td><p style="font-family:Arial;margin:0px"> </p></td></tr><tr><td colspan="2"><p style="line-height:20px;margin:0px"><a href="https://www.ptfs-europe.com" border="0" target="_blank"><img src="https://www.ptfs-europe.com/wp-content/uploads/2014/09/ptfs_logo1.png" width="" height="" border="0"></a></p></td></tr><tr><td><p style="font-family:Arial;margin:0px"><br></p></td></tr><tr><td><p style="font-family:Arial;margin:0px"><br></p></td></tr></tbody></table><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman';border-top-width:1px;border-top-style:solid;border-top-color:rgb(194,194,194);padding:20px 0px 0px;margin:0px"><tbody><tr><td><p style="font-family:Arial;font-size:12px;color:rgb(45,92,136);margin:0px">Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30</p><br><p style="font-family:Arial;font-size:12px;color:rgb(45,92,136);margin:0px">The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at <a href="mailto:info@ptfs-europe.com" target="_blank">info@ptfs-europe.com</a></p></td></tr></tbody></table><span style="font-size:12.8px"><br></span></div></div><div dir="ltr"></div></div></div></div></div>
</div></div>