swagger-core
swagger-core copied to clipboard
The name attribute of the annotation @ApiModelProperty does not take effect
When the second letter of the attribute name of my entity class is capitalized, swagger will interpret my letter as lowercase. At this time, I use the name attribute of @ApiModelProperty to solve the problem. It is found that it does not take effect. I hope to use the name attribute value to overwrite the original attribute value after JSON serialization, otherwise name does not play its due role, but will cause misunderstanding, I think this is a problem; I can understand if only the first letter is capitalized, but the second letter needs to be capitalized in many business scenarios
It seems to be working fine with Swagger 2 where @ApiModelProperty has been replaced by @Schema. I actually didn't need to set the name using the @Schema annotation as the generated openapi.json keeps the name of the class (entity) as is.
It seems to be working fine with Swagger 2 where
@ApiModelPropertyhas been replaced by@Schema. I actually didn't need to set the name using the@Schemaannotation as the generated openapi.json keeps the name of the class (entity) as is.
you say @ApiModelProperty does not work in Swagger 3.0? I found it works