knife4j icon indicating copy to clipboard operation
knife4j copied to clipboard

实体类中是用@Schema注解注释单个小写字母的驼峰命名字段,注解不生效问题

Open tri5m opened this issue 2 years ago • 3 comments

Describe the bug 您好,我在springDoc提了一个bug没人回应,你能帮我看看是什么原因 A clear and concise description of what the bug is. 在实体类中使用@Schema注释比如 private String hName,private String aTest这样的字段,不生效,除非是类似于 private String userName,private String test Screenshots image image

Knife4j Version (please complete the following information):

<dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
            <version>4.3.0</version>
        </dependency>

tri5m avatar Nov 01 '23 06:11 tri5m

是的,不能这么写,解析框架会认为不规范

xiaoymin avatar Nov 01 '23 07:11 xiaoymin

这就非常难受了,改的东西太多了,怎么会有这么奇怪要求。

tri5m avatar Nov 01 '23 07:11 tri5m

这个问题似乎是Jackson造成的: https://stackoverflow.com/questions/30205006/why-does-jackson-2-not-recognize-the-first-capital-letter-if-the-leading-camel-c

tri5m avatar Nov 01 '23 07:11 tri5m