springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

UpperSnakeCaseStrategy is not working with spring boot and ParameterObject

Open AlehGalo opened this issue 7 months ago • 3 comments

UpperSnakeCaseStrategy + ParameterObject + Spring Boot is not working properly.

Hi there.

I'm using Request DTO object.

@JsonNaming(PropertyNamingStrategies.UpperSnakeCaseStrategy.class)
@Data
public class RequestDto {
    private String personalNumber;
...
}

With Rest Controller

@GetMapping
    public Response getData(@ParameterObject @NonNull RequestDto requestDto) {
        return service.getdata(requestDto);
    }

There was a bug fixed #2484 Seems like case was missed and stayed untouched. It's not a frequent case but our company needs it.

Versions are as follows

<springdoc-openapi.version>2.6.0</springdoc-openapi.version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

Thanks in advance.

AlehGalo avatar Jul 09 '24 14:07 AlehGalo