title: symfony api-platform depth
body: <p>So far we've been struggling with Symfony, Doctrine, and Serializer depth.</p>
  
  <p>I'd like to be able to provide just one-level-depth JSON REST API with Symfony, allowing me to manage my "foreign key" and relation logic directly from the view.</p>
  
  <p><code>GET /people/1</code></p>
  
  <pre><code>{
    id:1,
    name:"theonewhoknocks",
    friends: [3, 12, 25]
  }
  </code></pre>
  
  <p>Using FosRESTBundle, we've been strugling at succeeding on that. (we've seen "depth" anotations and "groups" views for models, but none of this fit our need).</p>
  
  <p>The question is simple, before we make a choice for our future API, we have to know:</p>
  
  <p><strong><em>is <a href="https://api-platform.com/" rel="nofollow noreferrer">api-platform</a> able to provide a dead simple one level (with apparent foreign keys) REST API ?</em></strong></p>