Skip to content

response status is 500 /v3/api-docs #2485

@brsun

Description

@brsun

When I add validation annotations to a parameter, the documentation page shows a 500 error. However, when I remove the validation annotations, everything works fine.

with validation:

    @GetMapping("/test/{id}")
    public String testPost(@PathVariable @NotNull @Max(value = 100) Integer id) {
        return "Hello World!" + id;
    }

shows 500:
image

without validation:

    @GetMapping("/test/{id}")
    public String testPost(@PathVariable @NotNull Integer id) {
        return "Hello World!" + id;
    }

works well:
image

versions:

org.springframework.boot
spring-boot-starter-parent
3.2.1

    <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
        <version>2.3.0</version>
    </dependency>

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.1.Final</version>
    </dependency>

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions