How to automatically resolve model attributes on Sails.js routes?
<p>It is pretty easy to create an API using <a href="http://sailsjs.com/documentation/reference/command-line-interface/sails-generate" rel="nofollow noreferrer">Sails.js Generate</a>. Getting <a href="http://maangalabs.com/blog/2014/07/26/generating-rest-api-with-sails-js-part-2/" rel="nofollow noreferrer">this tutorial example</a>, running</p>

<pre><code>curl -X GET http://localhost:1337/employee/1
</code></pre>

<p>returns</p>

<pre><code>{
    "id": 1,
    "name": "John Smith",
    "email" "john@email.com",
    "empnum" "123",
    "createdAt" "2015-10-25T19:25:16.559Z",
    "updatedAt" "2015-10-25T19:25:16.559Z",
}
</code></pre>

<p>and </p>

<pre><code>curl -X GET http://localhost:1337/employee/1?fields=name
</code></pre>

<p>would return</p>

<pre><code>{
    "name": "John Smith"
}
</code></pre>

<p>Instead of passing a fields array, how can I configure Sails.js to resolve the subresource path like:</p>

<pre><code>curl -X GET http://localhost:1337/employee/1/name
</code></pre>