title: Web API methods to fill ComboBoxes?
body: <p>I have a bunch of <code>ComboBoxes</code> in my <strong>AngularJS</strong> web application that need to be filled. For the front-end, the only data I need is <strong>lists of Key, Value pairs</strong>.</p>
  
  <p>The problem is for the back-end: in order to fill those lists, I have generated <strong>a single Web API</strong> endpoint that provides "lists of things". </p>
  
  <p>The route is <code>/api/list/{id}</code></p>
  
  <p>Depending on the value of <code>{id}</code>, it will return lists of <code>Users</code>, <code>Accounts</code>, <code>Books</code>, <code>Cars</code>... in the same of key, value. For example, for the Id=1, it will return a list of Cars:</p>
  
  <pre><code>{1, "Ford" }, {1, "Toyota"}, {3, "Honda" } ...
  </code></pre>
  
  <p>That will be perfect for filling the ComboBoxes.</p>
  
  <p>So... I have a <strong>BIG SWITCH</strong> inside the method in my controller to determine which kind list I should return.</p>
  
  <p>I feel this is really dirty for the back-end, although for the front-end is quite handy. Just calling the same endpoint with a different magic number, I will get a different list.</p>
  
  <p>My question: Is there a better and cleaner approach for this scenario?</p>