REST - Addressability of resources (Composition, Collection)
<p>I'm designing a <code>REST-API</code> and currently I'm stuck with the following question. For example I got the following structure:</p>

<pre><code>/foods/fruits/{fruit}
/foods/meat/{meat}
</code></pre>

<p>for example:</p>

<pre><code>/foods/fruits/apple
/foods/fruits/pineapple
/foods/meat/chicken
</code></pre>

<p>Each of the endpoints is unique (<code>only one apple, one chicken</code>), but different sorts of <code>fruits</code> can exist (e.g. pineapple). 
However my <code>service</code> needs to return either </p>

<ul>
<li>one specific fruit (apple), </li>
<li>all fruits (collection-resource filled with all accessible fruits --> apple, pineapple) </li>
<li>or the whole food (composition of the collection-resources of fruits and meat)</li>
</ul>

<p>With this design my resource is addressable about 3 <code>URIs</code> (<code>composition, collection, endpoint</code>), but it should be a maxima of 2.
It this a restful design?</p>