Hi Yuri,
We’re not the ones maintaining SpringFox. Would suggest filing a ticket on the project directly. From: <[email protected]> on behalf of Yuri Matrosovs <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Friday, August 4, 2017 at 08:39 To: Swagger <[email protected]> Cc: Lukasz Kwasek <[email protected]> Subject: Not possible to set a default value using ApiModelProperty Hi, In our project we use Swagger via SpringFox. And in our API description we want to provide a default value for some fields in a Model Property. But, unfortunately there is no standard way of doing it, i.e. by using ApiModelProperty annotation, like: @ApiModelProperty ( name = "Name", required = true, defaultValue = "John Doe" // <--- this is not available in ApiModelProperty interface ) And according to the Swagger specification, properties should be able to have "default" values. See: https://swagger.io/specification/#properties-99 Are you ok if we fork your project, add the field in to the annotation and push it back? Or is there any other way of providing a default value for the property? Regards, Yuri -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
