title: How to indicate required properties for an object for swagger-ui
body: <p>I have simple CXF-REST application for which for one of the services', I have an object as input. One of the parameters are mandatory for successful validation, however, swagger-ui shows optional or empty.</p>
  <p>How to update it to show 'required' or a star mark ?</p>
  <p>I tried using <code>@ApiModelProperty(required=true)</code>, however no luck.</p>
  <pre class="lang-java prettyprint-override"><code>@Path(&quot;/user&quot;)
  @Api(value = &quot;/user&quot;, description = &quot;User Service&quot;)
  public interface UserService {
  
      @POST
      @Path(&quot;/saveUser&quot;)
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces(MediaType.APPLICATION_JSON)
      @ApiOperation(value = &quot;Save User details to backend&quot;, response = User.class)
      public User saveUser(User user);
  }
  
  
  @ApiModel(description = &quot;User&quot;)
  @XmlRootElement
  public class User {
  
      @ApiModelProperty(value = &quot;&quot;, required = true)
      private String name;
  
      private Integer age;
      //getters and setters
  }
  </code></pre>
  <p>We use <code>swagger-annotations_2.10-1.3.0.jar</code>,
  <code>swagger-core_2.10-1.3.0.jar</code>,
  <code>swagger-jaxrs_2.10-1.3.0.jar</code> in our application.</p>
  <p>ScreenShot is in the link below</p>
  <p><a href="https://i.stack.imgur.com/izfT6.jpg" rel="nofollow noreferrer">Swagger-required-properties</a></p>