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.