Passing values from database in "allowableValues"?
<p>I am using Swagger version 2 with Java Spring. I have declared a property and it works fine and it generates a drop down list of value I assigned.</p>
<pre><code>@ApiParam(value = &quot;Pass any one Shuttle provider ID from the list&quot;, allowableValues = &quot;1,2,3,4,10&quot;)
private Long hotelId;
    
</code></pre>
<p>Now, I need a way to populate this list which is passed in <code>allowableValues</code> from my database as it could be random list as well as huge data. How can I assign list of values dynamically from database in this <code>allowableValues</code>?</p>