Skip to content

UpperSnakeCaseStrategy is not working with spring boot and ParameterObject #2643

Closed
@AlehGalo

Description

@AlehGalo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions